Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Command Line Argument Parser written in Rust
A simply library for parsing command line arguments and subcommands when writing command line and console applications.
You can use
clap to lay out a list of possible valid command line arguments and subcommands, then let
clap parse the string given by the user at runtime.
clap you define a set of parameters and rules for your arguments and subcommands, then at runtime
clap will determine their validity.
clap also provides the traditional version and help switches 'for free' by parsing the list of possible valid arguments lazily at runtime, and if not already defined by the developer
clap will autogenerate all applicable "help" and "version" switches (as well as a "help" subcommand if other subcommands are defined as well).
After defining a list of possible valid arguments and subcommands,
clap gives you a list of valid matches that the user supplied at runtime, or informs the user of their error and exits gracefully. You can use this list to determine the functioning of your program.
// (Full example with comments in examples/01_QuickExample.rs) extern crate clap; use ;
If you were to compile the above program and run it with the flag
help subcommand, since we defined
test as a subcommand) the following output woud be presented
clap as a dependecy in your
Cargo.toml file to use from crates.io:
[dependencies] clap = "*"
Or track the latest on the master branch at github:
[dependencies.clap] git = "https://github.com/kbknapp/clap-rs.git"
cargo build or
cargo update for your project.
extern crate clap; to your crate root.
You can find complete documentation on the github-pages site for this project.
You can also find full usage examples in the examples/ directory of this repo.
How to build
Running the tests
Building the documentation
Run this instead of
cargo doc to generate the proper module docstring: