use std::io; use std::error::Error; use std::time::Duration; use clap::Parser; mod app; mod ui; mod crossterm; use crate::{ app::App, ui::ui, }; #[derive(Parser)] struct Cli { /// time in ms between two ticks. #[arg(short, long, default_value_t = 200)] tick_rate: u64, /// whether unicode symbols are used to improve the overall look of the app #[arg(short, long, default_value_t = true)] unicode: bool, } fn main() -> Result<(), Box> { let cli = Cli::parse(); let tick_rate = Duration::from_millis(cli.tick_rate); crate::crossterm::run(tick_rate, cli.unicode)?; Ok(()) }