| Crates.io | argv-lite |
| lib.rs | argv-lite |
| version | 0.1.0 |
| created_at | 2025-05-23 09:02:15.264931+00 |
| updated_at | 2025-05-23 09:02:15.264931+00 |
| description | A lightweight, ergonomic command-line argument parser for Rust. |
| homepage | https://github.com/enterprise-search/argv-lite |
| repository | https://github.com/enterprise-search/argv-lite |
| max_upload_size | |
| id | 1686070 |
| size | 5,242 |
A lightweight, ergonomic command-line argument parser for Rust.
Add to your Cargo.toml:
[dependencies]
argv-lite = "0.1"
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}");
}
}
See docs.rs/argv-lite for full API documentation.
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.