-
Notifications
You must be signed in to change notification settings - Fork 396
Expand file tree
/
Copy pathmain.rs
More file actions
30 lines (25 loc) · 797 Bytes
/
main.rs
File metadata and controls
30 lines (25 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use agg_mode_cli::commands::{self, submit::SubmitCommand};
use clap::{Parser, Subcommand};
use tracing_subscriber::{EnvFilter, FmtSubscriber};
#[derive(Debug, Parser)]
struct Cli {
#[command(subcommand)]
command: Command,
}
#[derive(Debug, Subcommand)]
enum Command {
#[command(subcommand)]
Submit(SubmitCommand),
}
#[tokio::main]
async fn main() {
let filter = EnvFilter::new("info");
let subscriber = FmtSubscriber::builder().with_env_filter(filter).finish();
tracing::subscriber::set_global_default(subscriber).expect("setting default subscriber failed");
let cli = Cli::parse();
match cli.command {
Command::Submit(subcommand) => match subcommand {
SubmitCommand::SP1(args) => commands::submit::run(args).await,
},
};
}