// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 mod bindings; mod build_ebpf; mod ci; mod disasm; 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, Bindings, Ci, Disasm, Run(run::Options), } fn main() { let opts = Options::parse(); use Command::*; let ret = match opts.command { BuildEbpf => build_ebpf::run(), Bindings => bindings::run(), Ci => ci::run(), Disasm => disasm::run(), Run(opts) => run::run(opts), }; if let Err(e) = ret { eprintln!("{e:#}"); exit(1); } }