Crates.io | minui |
lib.rs | minui |
version | 0.1.4 |
created_at | 2025-06-17 03:36:26.111331+00 |
updated_at | 2025-09-18 18:02:40.597693+00 |
description | A minimalist Rust framework for TUIs and terminal games. |
homepage | https://github.com/JackDerksen/minui |
repository | https://github.com/JackDerksen/minui |
max_upload_size | |
id | 1715161 |
size | 285,891 |
MinUI is a minimal terminal-based game and UI engine written in Rust. This project is a work in progress, currently in its very early stages!
MinUI was born from a desire to create terminal-based games in Rust, specifically a terminal Tetris clone in my case. While several terminal UI libraries/frameworks exist for Rust, none quite offered the perfect balance of simplicity, performance, and game-focused features that I was looking for. MinUI aims to fill this gap by providing a fast, easy-to-use framework that makes terminal game and UI development a joy.
MinUI is in early development, and I'm actively working on adding more features:
Simply add the MinUI crate to your cargo.toml as follows:
[dependencies]
minui = "0.1.4"
Then you can get started using one of the simple, provided example programs.
use minui::{Window, Event, TerminalWindow};
// This example shows the minimal workflow, how to:
// - Create a window
// - Write some text
// - Enter an input loop
// - Handle different types of input events
// - Clean up automatically when done
fn main() -> minui::Result<()> {
let mut window = TerminalWindow::new()?;
window.clear()?;
window.write_str(0, 0, "Press 'q' to quit")?;
loop {
match window.get_input()? {
Event::Character('q') => break,
Event::Character(c) => {
window.write_str(1, 0, &format!("You pressed: {}", c))?;
}
evt => {
window.write_str(1, 0, &format!("Event: {:?}", evt))?;
}
}
}
Ok(())
}
Run the example program with the command: cargo run --example basic_usage
MinUI is designed to make terminal game development straightforward. Here's what makes it great for games:
MinUI also has a focus on simplifying the task of building TUI applications. Here's some of what it has to offer:
Built using: