2 releases
0.1.1 | May 5, 2022 |
---|---|
0.1.0 | May 2, 2022 |
#226 in #command-line-arguments
5KB
62 lines
cmdargs
Command line argument parser for Rust.
NOTE: this library is under development and "not production ready".
Usage
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!");
}