Tuikit
Tuikit is a TUI library for writing terminal UI applications. Highlights:
- Thread safe.
- Support non-fullscreen mode as well as fullscreen mode.
- Support
Altkeys, mouse events, etc. - Buffering for efficient rendering.
Tuikit is modeld after termbox which views the terminal as a table of fixed-size cells and input being a stream of structured messages.
Usage
In your Cargo.toml add the following:
[]
= "*"
And if you'd like to use the latest snapshot version:
[]
= { = "https://github.com/lotabout/tuikit.git" }
Here is an example (could also be run by cargo run --example hello-world):
use *;
use ;
use Key;
use Event;
use ;
Future Plans
Goal:
- "Layout System". Something like the CSS "flexbox" for managing layouts of TUI applications.
Not Goal:
- Windows support due to my lack of windows experience.
- TUI Widges.
References
Tuikit borrows ideas from lots of other projects:
- rustyline Readline Implementation in Rust.
- How to enter the raw mode.
- Part of the keycode parsing logic.
- termion A bindless library for controlling terminals/TTY.
- How to parse mouse events.
- How to enter raw mode.
- rustbox and termbox
- The idea of viewing terminal as table of fixed cells.
- termfest Easy TUI library written in Rust
- The buffering idea.