use clap::{Parser, Subcommand};
mod commands;
mod compression;
#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
static VERSION: &str = env!("CARGO_PKG_VERSION");
#[derive(Parser)]
#[clap(name = "wpt", version = VERSION)]
pub(crate) struct Cli {
#[command(subcommand)]
pub(crate) action: Commands,
}
#[derive(Subcommand)]
pub(crate) enum Commands {
#[clap(name = "calc-scores")]
CalcScores(commands::CalcScores),
#[clap(name = "merge")]
Merge(commands::Merge),
#[clap(name = "convert")]
Convert(commands::Convert),
#[clap(name = "diff")]
Diff(commands::Diff),
}
fn main() {
let args = Cli::parse();
match args.action {
Commands::CalcScores(cmd) => cmd.run(),
Commands::Merge(cmd) => cmd.run(),
Commands::Convert(cmd) => cmd.run(),
Commands::Diff(cmd) => cmd.run(),
};
}