argv-lite-derive 0.1.0

A procedural macro for argv-lite, providing derive macros for argument parsing.
Documentation

argv-lite-derive

Crates.io Documentation License

A procedural macro crate for argv-lite, providing derive macros for ergonomic command-line argument parsing.

Features

  • Derive macros for struct-based CLI argument parsing
  • Built on top of syn and quote
  • Designed for use with the argv-lite ecosystem

Usage

Add to your Cargo.toml:

[dependencies]
argv-lite = "0.1"
argv-lite-derive = "0.1"

Annotate your struct with the derive macro:

use argv_lite_derive::ArgvLite;

#[derive(ArgvLite)]
struct Args {
    #[arg(short = 'v', long = "verbose")]
    verbose: bool,

    #[arg(short = 'o', long = "output")]
    output: Option<String>,
}

Documentation

See docs.rs/argv-lite-derive for full API documentation.

License

Licensed under either of:

Contribution

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.