RepositoryOdin
Huseynteymurzade28

Huseynteymurzade28/hnoss

An immediate-mode TUI library for Odin. Pure Odin, no C, batteries included.

115sao
3fork
17issue
3lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: odin-lang

#1 Repository của tuần

1
TINIX TRENDING·Chủ đề: truecolor

#1 Repository của tuần

1
TINIX TRENDING·Chủ đề: immediate-mode

#1 Repository của tuần

hnoss logo

hnoss

An immediate-mode TUI library for Odin. Pure Odin, no C, batteries included.
Documentation · Guide · Widgets · Examples

CI

hnoss demo

examples/demo: plasma, a shaded 3D torus on a braille canvas, live graphs and scripted input, at 60 fps in ~2 ms a frame.

hnoss monitor

examples/monitor: a live system monitor reading /proc, in the Odlar Yurdu theme.

showcase
Widgets
tabs, lists, braille graph, table, gauges, input
plasma
Truecolor at 60 fps
double-buffered diff, one write per frame
text
Text & markup
wrapping by grapheme, [b red]markup[/]
layout
Layout
cuts, split, grid, center
list
Stateful widgets
keyboard, mouse, focus
events
Input
keys, modifiers, mouse, paste

Install

hnoss is a plain Odin package; there is no package manager, so add the repository to your project:

git submodule add https://github.com/Huseynteymurzade28/hnoss libs/hnoss   # inside a git repo (git init first)
# or, without git in your project:
git clone https://github.com/Huseynteymurzade28/hnoss libs/hnoss

Then import it by path, relative to the file that imports it (import hnoss "libs/hnoss"), or register a collection once and import it from anywhere in your project:

odin run . -collection:libs=libs      # import hnoss "libs:hnoss"

Quick start

package main

import hnoss "libs/hnoss"

main :: proc() {
    term, _ := hnoss.init(hnoss.DEFAULT_OPTIONS + {.Mouse_Capture})
    defer hnoss.deinit(&term)           // the terminal is always restored, even on panic or Ctrl+C

    cities := []string{"Bakı", "Gəncə", "Şəki", "Lənkəran"}
    list: hnoss.List_State
    events: []hnoss.Event
    for {
        f := hnoss.begin_frame(&term)
        ui := hnoss.ui(f, events)
        inner := hnoss.box(ui, hnoss.inset(f.area, 1), "🇦🇿 [b]Cities[/]")
        hnoss.focus(ui, &list)
        hnoss.list(ui, inner, cities, &list)          // ↑↓, click, wheel

        for ev in hnoss.unhandled(ui) {
            if hnoss.is_char(ev, 'q') { return }
        }
        hnoss.end_frame(&term)                        // diff, one write
        free_all(context.temp_allocator)
        events = hnoss.poll_events(&term, -1)
    }
}

Why hnoss

  • Pure Odin. Only core: and base:; raw syscalls on Linux, no ncurses, no libc bindings.
  • Immediate mode. Calling a widget draws it, handles its input and returns what happened.
  • Fast. Only changed cells are written; a full 200×60 truecolor frame diffs in ~2 ms.
  • Correct text. Unicode 16 widths and grapheme clusters: 世界, é, 👩‍💻, 🇦🇿.
  • Safe. Raw mode, alt screen and cursor are restored on exit, panic and signals.

Build

./build.sh                 # check + tests + all examples into bin/
./build.sh run demo        # or: showcase, monitor, plasma, text, layout, event_inspector, w_<widget>

Linux today; the platform layer is one small file so macOS/Windows can follow.

License

MIT

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryShell
ohmyzsh/ohmyzsh

🙃 A delightful, community-driven framework for managing your zsh configuration. Built by 2,600+ contributors, with hundreds of plugins (git, rails, laravel, node, python, docker, kubectl, aws, and more), themes to spice up your terminal, and automatic updates to keep your command line feeling like home.

191.0k
Nov 29, 2026
RepositoryPython
Textualize/textual

The lean application framework for Python. Build sophisticated user interfaces with a simple Python API. Run your apps in the terminal and a web browser.

37.7k
Nov 9, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryTypeScript
n8n-io/n8n

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

212.9k
Dec 2, 2026
RepositoryOdin
odin-lang/Odin

Odin Programming Language

12.4k
Dec 1, 2026
RepositoryOdin
karl-zylinski/karl2d

Odin 2D game library. Beginner friendly and easy to modify.

732
Nov 27, 2026
RepositoryOdin
dresswithpockets/odin-godot

Godot toolkit for the Odin programming language

169
Sep 9, 2026
RepositoryOdin
thetarnav/odin-wasm

Odin + WASM = 💙

142
Jan 11, 2025
RepositoryOdin
NateTheGreatt/odecs

A simple, modern ECS built in Odin

121
Mar 1, 2026