1 unstable release
0.1.1 | Oct 27, 2023 |
---|
#108 in #ratatui
15KB
199 lines
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.
Dependencies
~12–19MB
~249K SLoC