holey-bytes/xtask/src/main.rs
2024-07-08 07:27:40 +02:00

31 lines
521 B
Rust

mod fmt;
mod utils;
use {
argh::FromArgs,
std::{io, path::Path},
};
fn root() -> &'static Path {
Path::new(env!("CARGO_MANIFEST_DIR")).parent().unwrap()
}
/// xTask for Holey Bytes project
#[derive(FromArgs)]
struct Command {
#[argh(subcommand)]
subcom: Subcommands,
}
#[derive(FromArgs)]
#[argh(subcommand)]
enum Subcommands {
Format(fmt::Command),
}
fn main() -> io::Result<()> {
match argh::from_env::<Command>().subcom {
Subcommands::Format(com) => fmt::command(com),
}
}