rustui
A modern, safe, and ergonomic terminal UI library for Rust, designed 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
Quick Start
Add this to your Cargo.toml:
[]
= "0.1.1"
Basic Example
use *;
use ;
const RENDERING_RATE: Duration = from_millis;
const INPUT_CAPTURING_RATE: Duration = from_millis; // ms
Example Applications
This repository includes a demo application that showcases the library's capabilities:
Hello World
Colors
Tetris
Dependencies
nix(0.30.+) - For Unix terminal controlbitflags(2.9+) - For attribute flag managementrand(0.9+)
Platform Support
Currently supports Unix-like systems:
- Linux
- macOS
- BSD variants
Windows support may be added in future versions.
Contributing
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.
Development
# Clone the repository
# Build the library
# Run tests
# Run the demo
License
This project is licensed under the MIT License - see the LICENSE file for details.
Note: This library is designed for educational purposes and as a foundation for terminal-based applications. For production use, consider established libraries like crossterm or tui-rs depending on your needs.