mod args;
mod collect;
mod mapper;
mod run;
mod workspace;

use clap::Parser;

#[tokio::main]
async fn main() {
    let args = args::Args::parse();

    workspace::change_to_workspace_dir()
        .await
        .expect("Failed to change to workspace directory");

    match args.command {
        Some(args::Command::Run { release }) => {
            run::run(release).await;
        }
        None => {
            run::run(false).await;
        }
        Some(args::Command::Collect) => {
            collect::collect().await;
        }
        Some(args::Command::Mapper) => {
            mapper::mapper().await;
        }
    }
}
