Crates.io | ratatui-template |
lib.rs | ratatui-template |
version | 0.1.1 |
source | src |
created_at | 2023-10-27 14:06:42.397425 |
updated_at | 2023-10-27 14:06:42.397425 |
description | Base TUI struct with backend in ratatui; copied from Ratatui Book: https://ratatui.rs/how-to/develop-apps/abstract-terminal-and-event-handler.html |
homepage | https://github.com/artkonr/ratatui-template |
repository | |
max_upload_size | |
id | 1016061 |
size | 17,372 |
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.
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
.
Built as a Rust lib, you know the drill:
cargo build
The project requires Rust 1.73.0
or later.