ratatui-template

Crates.ioratatui-template
lib.rsratatui-template
version0.1.1
sourcesrc
created_at2023-10-27 14:06:42.397425
updated_at2023-10-27 14:06:42.397425
descriptionBase TUI struct with backend in ratatui; copied from Ratatui Book: https://ratatui.rs/how-to/develop-apps/abstract-terminal-and-event-handler.html
homepagehttps://github.com/artkonr/ratatui-template
repository
max_upload_size
id1016061
size17,372
Artem Kononov (artkonr)

documentation

README

Base TUI template

Almost completely copied from the Ratatui Book.

Any author credentials belong to the Ratatui team. This repository does not claim any ownership over the source code.

Getting started

Add the dependency to the Cargo.toml:

ratatui-template = "0.1.1"

And then simply include it into your Rust TUI app:

use ratatui_template::Tui;

#[tokio::main]
async fn main() -> color_eyre::Result<()> {
    let mut interface = Tui::new()?;
    
    interface.enter()?;
    loop {
        // implement application loop
    }
    interface.exit()?;
}

Note: async features are powered by tokio.

Building

Built as a Rust lib, you know the drill:

cargo build

The project requires Rust 1.73.0 or later.

Commit count: 0

cargo fmt