holey-bytes/xtask/src/main.rs

30 lines
555 B
Rust
Raw Normal View History

mod fmt;
mod utils;
2024-07-08 00:22:53 -05:00
use {
argh::FromArgs,
once_cell::sync::Lazy,
std::{io, path::Path},
};
static ROOT: Lazy<&Path> = Lazy::new(|| 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),
}
2024-07-08 00:22:53 -05:00
fn main() -> io::Result<()> {
match argh::from_env::<Command>().subcom {
Subcommands::Format(com) => fmt::command(com),
}
}