27 lines
571 B
Rust
27 lines
571 B
Rust
use clap::Parser;
|
|
use color_eyre::eyre::Result;
|
|
|
|
use ratatrix::{app::App, cli::Cli, log::initialize_logging, utils::initialize_panic_handler};
|
|
|
|
async fn tokio_main() -> Result<()> {
|
|
let mem_log = initialize_logging()?;
|
|
|
|
initialize_panic_handler()?;
|
|
|
|
let args = Cli::parse();
|
|
let mut app = App::new(args.frame_rate, mem_log).await?;
|
|
app.run().await?;
|
|
|
|
Ok(())
|
|
}
|
|
|
|
#[tokio::main]
|
|
async fn main() -> Result<()> {
|
|
if let Err(e) = tokio_main().await {
|
|
eprintln!("{} error: Something went wrong", env!("CARGO_PKG_NAME"));
|
|
Err(e)
|
|
} else {
|
|
Ok(())
|
|
}
|
|
}
|