You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aya/xtask/src/main.rs

33 lines
501 B
Rust

mod codegen;
mod docs;
use std::process::exit;
use clap::Parser;
#[derive(Parser)]
pub struct Options {
#[clap(subcommand)]
command: Command,
}
#[derive(Parser)]
enum Command {
Codegen(codegen::Options),
Docs,
}
fn main() {
let opts = Options::parse();
use Command::*;
let ret = match opts.command {
Codegen(opts) => codegen::codegen(opts),
Docs => docs::docs(),
};
if let Err(e) = ret {
eprintln!("{:#}", e);
exit(1);
}
}