🌐 Language
AppCUI-rs

AppCUI-rs is a fast, cross-platform Rust library for building modern, text-based user interfaces (TUIs) with rich widgets, themes, and full Unicode support—an alternative to ncurses and other terminal UI frameworks.
✨ Features
- [x] multiple out-of-the-box controls (buttons, labels, text boxes, check boxes, radio buttons, list views, tree views, combo boxes, date/time pickers, color pickers, tabs, accordeons, etc.). A full list of controls can be found here
- [x] powerful layout system that allows you to position controls using absolute coordinates, relative coordinates, docking, alignment, anchors or pivot positioning (see more here)
- [x] menus and toolbars
- [x] multi-platform support (Windows via API and virtual terminal, Linux via ncurses, MacOS via termios)
- [x] multi-threading support to allow background tasks
- [x] timers
- [x] mouse support
- [x] clipboard support
- [x] color themes
- [x] support for Unicode characters
- [x] predefined dialogs (message box, input box, color picker, save & open dialogs, folder navigator, etc)
- [x] true colors support (24 bits per pixel) for terminals that supports it.
📸 Screenshots

👉 Check out the Gallery for full demos of all controls!
🖥️ Backends
AppCUI supports various backends based on the operating system it is being used for:
- Windows Console - based on Win32 low level API, designed for classical Windows console
- Windows VT - based on ANSI sequences, designed for modern Windows virtual terminals
- NCurses - based on NCurses API for Linux environments
- Termios - based on ANSI sequences and low level APIs for MAC OSX
- Web Terminal - designed for Web implementation (based on webgl)
- CrossTerm - based on the crossterm
crate, but enabled via a feature flag
🚀 Quick Start
Add the following to your Cargo.toml:
toml
[dependencies]
appcui = "*"
Then create a new Rust project and add the following code:
rust
use appcui::prelude::*;fn main() -> Result<(), appcui::system::Error> { let mut app = App::new().build()?; let mut win = Window::new( "Test", LayoutBuilder::new().alignment(Alignment::Center).width(30).height(9).build(), window::Flags::Sizeable, ); win.add(Label::new( "Hello World !", LayoutBuilder::new().alignment(Alignment::Center).width(13).height(1).build(), )); app.add_window(win); app.run(); Ok(()) }
or a more compact version using proc-macros:
rs
use appcui::prelude::*;fn main() -> Result<(), appcui::system::Error> { let mut app = App::new().build()?; let mut win = window!("Test,a:c,w:30,h:9"); win.add(label!("'Hello World !',a:c,w:13,h:1")); app.add_window(win); app.run(); Ok(()) }
rust use appcui::prelude::*;Then run the project withcargo run. You should see a window with the titleTestand the textHello World !in the center.🧪 Examples
AppCUI-rs comes with a set of examples to help you get started. You can find them in the examples folder, including:
- Games such as Tic Tac Toe, Snake, Flappy Bird, Minesweeper, Ram it, PacMan, Chees, Connect Four, 2048 or Tetris
- Utilities such as Calculator, CSV Viewer, Temperature Converter or a Timer
- Animations such as Matrix, Fractals or Spiral
- Controls/Widgets such as Button, CheckBox, ComboBox, DatePicker, ListView, TreeView and many more.
- Dialogs such as Notification or Input
🛠️ A more complex example
An example that creates a window with a button that when pressed increases a counter.
// Create a window that handles button events and has a counter #[Window(events = ButtonEvents)] struct CounterWindow { counter: i32 }
impl CounterWindow { fn new() -> Self { let mut w = Self { // set up the window title and position base: window!("'Counter window',a:c,w:30,h:5"), // initial counter is 1 counter: 1 }; // add a single button with the caption "1" (like the counter) w.add(button!("'1',d:b,w:20")); w } } impl ButtonEvents for CounterWindow { // When the button is pressed, this function will be called // with the handle of the button that was pressed // Since we only have one button, we don't need to store its handle // in the struct, as we will receive the handle via the on_pressed method fn on_pressed(&mut self, handle: Handle
fn main() -> Result<(), appcui::system::Error> { // create a new application let mut a = App::new().build()?; // add a new window (of type CounterWindow) to the application a.add_window(CounterWindow::new()); // Run AppCUI framework (this wil start the window loop and messaage passing) a.run(); Ok(()) } ``
🛣️ Roadmap
- [x] Basic set of widgets and support for Windows, Linux and MacOS
- [x] WebGL support
- [ ] OpenGL / SDL / Vulkan support
- [ ] TextArea support for code highlighting
🤝 Contributing
Contributions, issues, and feature requests are welcome! Check out CONTRIBUTING.md to get started.
Join the discussion in GitHub Discussions.
--- Tranlated By Open Ai Tx | Last indexed: 2026-02-09 ---