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.
23 lines
410 B
Rust
23 lines
410 B
Rust
4 years ago
|
mod aya_bpf;
|
||
|
|
||
|
use structopt::StructOpt;
|
||
|
|
||
|
#[derive(StructOpt)]
|
||
|
pub struct Options {
|
||
|
#[structopt(subcommand)]
|
||
|
command: Command,
|
||
|
}
|
||
|
|
||
|
#[derive(StructOpt)]
|
||
|
enum Command {
|
||
|
#[structopt(name = "aya-bpf")]
|
||
|
AyaBpf(aya_bpf::CodegenOptions),
|
||
|
}
|
||
|
|
||
|
pub fn codegen(opts: Options) -> Result<(), anyhow::Error> {
|
||
|
use Command::*;
|
||
|
match opts.command {
|
||
|
AyaBpf(opts) => aya_bpf::codegen(opts),
|
||
|
}
|
||
|
}
|