mirror of https://github.com/aya-rs/aya
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.
30 lines
474 B
Rust
30 lines
474 B
Rust
mod codegen;
|
|
|
|
use std::process::exit;
|
|
|
|
use structopt::StructOpt;
|
|
#[derive(StructOpt)]
|
|
pub struct Options {
|
|
#[structopt(subcommand)]
|
|
command: Command,
|
|
}
|
|
|
|
#[derive(StructOpt)]
|
|
enum Command {
|
|
Codegen(codegen::Options),
|
|
}
|
|
|
|
fn main() {
|
|
let opts = Options::from_args();
|
|
|
|
use Command::*;
|
|
let ret = match opts.command {
|
|
Codegen(opts) => codegen::codegen(opts),
|
|
};
|
|
|
|
if let Err(e) = ret {
|
|
eprintln!("{:#}", e);
|
|
exit(1);
|
|
}
|
|
}
|