blob: c1c594e02b03025a4a9382944ba4d199d51d1d1c (
plain) (
tree)
|
|
mod build_ebpf;
mod run;
use std::process::exit;
use clap::Parser;
#[derive(Debug, Parser)]
pub struct Options {
#[clap(subcommand)]
command: Command,
}
#[derive(Debug, Parser)]
enum Command {
BuildEbpf(build_ebpf::Options),
Run(run::Options),
}
fn main() {
let opts = Options::parse();
use Command::*;
let ret = match opts.command {
BuildEbpf(opts) => build_ebpf::build_ebpf(opts),
Run(opts) => run::run(opts),
};
if let Err(e) = ret {
eprintln!("{e:#}");
exit(1);
}
}
|