argv-lite

Crates.ioargv-lite
lib.rsargv-lite
version0.1.0
created_at2025-05-23 09:02:15.264931+00
updated_at2025-05-23 09:02:15.264931+00
descriptionA lightweight, ergonomic command-line argument parser for Rust.
homepagehttps://github.com/enterprise-search/argv-lite
repositoryhttps://github.com/enterprise-search/argv-lite
max_upload_size
id1686070
size5,242
Max Z (oxnz)

documentation

https://docs.rs/argv-lite

README

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.

Commit count: 0

cargo fmt