argwerk 0.20.4

Simple command-line parser through a declarative macro.
Documentation
argwerk::define! {
    /// A simple tool.
    #[usage = "tool [-h]"]
    struct Args {
        help: bool,
        limit: usize = 10,
    }
    /// The limit of the operation. (default: 10).
    ["-l" | "--limit", int] => {
        limit = str::parse(&int)?;
    }
    /// Print this help.
    ["-h" | "--help"] => {
        println!("{}", HELP);
        help = true;
    }
}

fn main() -> Result<(), argwerk::Error> {
    let args = Args::args()?;
    if args.help {
        return Ok(());
    }

    dbg!(args);
    Ok(())
}