appelgriebsch / rust-tui-template

A template for bootstrapping a Rust TUI application with ratatui & crossterm

Home Page:https://www.youtube.com/watch?v=ogdJnOLo238

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ratatui-template πŸ§€

A template for bootstrapping a Rust TUI application with Ratatui & crossterm.

Project structure

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

Creating a project

  1. Install cargo-generate
cargo install cargo-generate
  1. Clone this repository via cargo-generate:
cargo generate --git https://github.com/ratatui-org/ratatui-template --name <project-name>

See also

About

A template for bootstrapping a Rust TUI application with ratatui & crossterm

https://www.youtube.com/watch?v=ogdJnOLo238

License:MIT License


Languages

Language:Rust 100.0%