2023-10-18 05:14:24 -05:00
|
|
|
mod fmt;
|
|
|
|
mod utils;
|
|
|
|
|
2024-07-08 00:22:53 -05:00
|
|
|
use {
|
|
|
|
argh::FromArgs,
|
|
|
|
once_cell::sync::Lazy,
|
|
|
|
std::{io, path::Path},
|
|
|
|
};
|
2023-10-18 05:14:24 -05:00
|
|
|
|
|
|
|
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<()> {
|
2023-10-18 05:14:24 -05:00
|
|
|
match argh::from_env::<Command>().subcom {
|
|
|
|
Subcommands::Format(com) => fmt::command(com),
|
|
|
|
}
|
|
|
|
}
|