This repository contains templates 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
-
Create a new app based on this repository:
cargo generate ratatui-org/ratatui-template simple
- Rust Munich Meetup #8 - Designing TUI Applications in Rust (2021/outdated)