argv-lite 0.1.0

A lightweight, ergonomic command-line argument parser for Rust.
Documentation
  • Coverage
  • 0%
    0 out of 1 items documented0 out of 0 items with examples
  • Size
  • Source code size: 4.73 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.04 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • oxnz

argv-lite

Crates.io Documentation License

A lightweight, ergonomic command-line argument parser for Rust.

Features

  • Simple and intuitive API for parsing command-line arguments
  • Derive macro support for struct-based argument parsing
  • Zero dependencies for core parsing
  • Fast compile times and minimal runtime overhead

Usage

Add to your Cargo.toml:

[dependencies]
argv-lite = "0.1"

Example

use argv_lite_derive::ArgvLite;

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

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

fn main() {
    let args = Args::parse();
    if args.verbose {
        println!("Verbose mode enabled");
    }
    if let Some(output) = args.output {
        println!("Output file: {output}");
    }
}

Documentation

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

License

Contribution

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