fe/
main.rs

1mod task;
2
3use clap::Parser;
4use fe_common::panic::install_panic_hook;
5use task::Commands;
6
7#[derive(Parser)]
8#[clap(author, version, about, long_about = None)]
9struct FelangCli {
10    #[clap(subcommand)]
11    command: Commands,
12}
13
14fn main() {
15    install_panic_hook();
16
17    let cli = FelangCli::parse();
18
19    match cli.command {
20        Commands::Build(arg) => {
21            task::build(arg);
22        }
23        Commands::Check(arg) => {
24            task::check(arg);
25        }
26        Commands::New(arg) => {
27            task::create_new_project(arg);
28        }
29        #[cfg(feature = "solc-backend")]
30        Commands::Verify(arg) => {
31            task::verify(arg);
32        }
33        #[cfg(feature = "solc-backend")]
34        Commands::Test(arg) => {
35            task::test(arg);
36        }
37    }
38}