diff --git a/rust/meow/Cargo.toml b/rust/meow/Cargo.toml new file mode 100644 index 0000000..1127050 --- /dev/null +++ b/rust/meow/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "meow" +version = "0.1.0" +authors = ["Timothy Warren "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +clap = "2.33.0" diff --git a/rust/meow/src/main.rs b/rust/meow/src/main.rs new file mode 100644 index 0000000..0af22c5 --- /dev/null +++ b/rust/meow/src/main.rs @@ -0,0 +1,21 @@ +#[macro_use] +extern crate clap; + +fn main() { + let matches = clap_app!(myapp => + (version: "1.0") + (author: env!("CARGO_PKG_AUTHORS")) + (about: "Does awesome things") + (@arg config: -c --config +takes_value "Sets a custom config file") + (@arg INPUT: +required "Sets the input file to use") + (@arg verbose: -v ... "Sets the level of verbosity") + (@subcommand test => + (about: "controls testing features") + (version: "1.3") + (author: "Someone E. ") + (@arg debug: -d "print debug information") + ) + ).get_matches(); + + println!("{:?}", matches); +}