2023-07-26 19:19:50 +00:00
|
|
|
mod app;
|
|
|
|
mod ui;
|
|
|
|
mod accounts;
|
2023-07-23 13:53:31 +00:00
|
|
|
mod cli;
|
|
|
|
|
|
|
|
use clap::Parser;
|
|
|
|
|
|
|
|
use crate::cli::{Args, Command};
|
2023-06-14 21:49:20 +00:00
|
|
|
|
2023-06-15 17:19:24 +00:00
|
|
|
#[tokio::main]
|
|
|
|
async fn main() -> anyhow::Result<()> {
|
2023-07-01 10:44:11 +00:00
|
|
|
cli_log::init_cli_log!();
|
2023-06-15 17:19:24 +00:00
|
|
|
|
2023-07-23 13:53:31 +00:00
|
|
|
let args = Args::parse();
|
2023-07-24 21:38:16 +00:00
|
|
|
let command = args.subcommand.unwrap_or(Command::Start {});
|
2023-07-23 13:53:31 +00:00
|
|
|
match command {
|
|
|
|
Command::Start {} => {
|
|
|
|
let mut app = app::App::new()?;
|
2023-09-09 19:29:46 +00:00
|
|
|
app.run(args.lua_config_file).await?;
|
2023-07-23 13:53:31 +00:00
|
|
|
}
|
|
|
|
};
|
2023-06-14 21:49:20 +00:00
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|