Crates.io | cmdargs |
lib.rs | cmdargs |
version | 0.1.1 |
source | src |
created_at | 2022-05-02 22:53:15.146828 |
updated_at | 2022-05-05 05:15:05.738857 |
description | Command line argument parser for Rust |
homepage | https://github.com/puccinia/cmdargs.git |
repository | https://github.com/puccinia/cmdargs.git |
max_upload_size | |
id | 579389 |
size | 4,329 |
Command line argument parser for Rust.
NOTE: this library is under development and "not production ready".
Add the following to your Cargo.toml:
[dependencies]
cmdargs = "0.1.1"
Example:
use cmdargs;
fn main() {
let parser = cmdargs::parser_from_str! {"
Usage: hello-world [options]
Options:
-a, --all Print Hello World
-H, --hello Print Hello
-W, --world Print World
-h, --help Print help information
-V, --version Print version information
"};
parser.parse();
println!("Hello World!");
}