Skip to content

Templates for bootstrapping a Rust TUI application with Ratatui

License

Notifications You must be signed in to change notification settings

f-forcher/templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ratatui templates 🧀

This repository contains templates for bootstrapping a Rust TUI application with Ratatui & crossterm.

Creating a project

  1. Install cargo-generate

    cargo install cargo-generate
  2. Create a new app based on this repository:

    cargo generate ratatui-org/ratatui-template
  3. Choose either the Simple or Async template.

Simple template

The simple template will create the following 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

See also

About

Templates for bootstrapping a Rust TUI application with Ratatui

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Rust 100.0%