Expand description
§Tuit is a no_std TUI library intended for use in bare-metal applications
Tuit is a library for the hardcore, no_std, no_alloc Rust user.
When I began on my operating system journey, I noticed that there was not a single no_std TUI library. So I
decided to make my own, and share it!
API is partially inspired by embedded_graphics, my beloved.
use tuit::terminal::ConstantSize;
use tuit::widgets::builtins::Text;
use tuit::prelude::*;
let mut terminal = ConstantSize::<20, 20>::new();
let text = Text::new("Hello world!");
text.drawn(&mut terminal).expect("This won't fail."); // Draws "Hello world!" in the center of the screen.Modules§
- allocations
- The parts of Tuit that can be enabled if
allocfunctionality is available. - draw
- The draw module is responsible for the traits that let you draw to the screen
- errors
- Errors
- prelude
- The crate’s prelude includes items that you’d usually want imported in a project that uses Tuit. It imports all the traits related to terminals.
- std
- The parts of Tuit that can be enabled when there is standard library support.
- style
- Structs related to styles – includes
style::Styleandstyle::Colour
All the important types for styling in Tuit. Contains structs likeColourandStyle. - terminal
- Terminals
- widgets
- Widgets
Type Aliases§
- Result
- This is a type alias used by
tuitfor its errors.