A template for bootstrapping a Rust TUI application with Ratatui
& crossterm
.
src/
βββ app.rs -> holds the state and application logic
βββ event.rs -> handles the terminal events (key press, mouse click, resize, etc.)
βββ handler.rs -> handles the key press events and updates the application
βββ lib.rs -> module definitions
βββ main.rs -> entry-point
βββ tui.rs -> initializes/exits the terminal interface
βββ ui.rs -> renders the widgets / UI
- Install
cargo-generate
cargo install cargo-generate
- Clone this repository via
cargo-generate
:
cargo generate --git https://github.com/ratatui-org/ratatui-template --name <project-name>
- Rust Munich Meetup #8 - Designing TUI Applications in Rust (2021/outdated)