Crate rustui

Source
Expand description

§rustui

The simplest terminal UI library designed for Rust. Developed with Rust’s ownership model and safety guarantees in mind.

§Features

  • Cross-platform: Works on Unix-like systems (Linux, macOS, etc.)
  • Double Buffering: Efficient rendering with differential updates
  • Rich Text Styling: Support for colors, attributes (bold, italic, underline, etc.)
  • Non-blocking Input: Asynchronous keyboard input handling
  • Thread-safe: Multi-threaded rendering and input processing

§Architecture

The library is organized into several core modules:

  • framebuffer - Character grid for efficient rendering
  • window - High-level windowing abstraction with thread management
  • input - Non-blocking keyboard and mouse input handling
  • term - Terminal colors, attributes, and ANSI escape sequences
  • render - Rendering utilities and drawing primitives

§Performance

rustui is optimized for performance with:

  • Differential updates (only changed cells are redrawn)
  • Efficient ANSI sequence generation

Re-exports§

pub use framebuffer::*;
pub use input::*;
pub use render::*;
pub use term::*;
pub use window::*;

Modules§

framebuffer
A module for handling the framebuffer.
input
A module for handling user input.
render
A module for a rendering context.
term
A module for handling terminal colors and attributes.
window
A module for handling windowing.

Macros§

csi
Create a CSI (Control Sequence Introducer) escape sequence