Crate clap_cargo
source ·Expand description
clap-cargo: Re-usable CLI flags for cargo
plugins
Install
Add to your Cargo.toml
:
[dependencies]
clap-cargo = "0.1"
Examples
// ...
#[derive(Debug, clap::Parser)]
struct Cli {
#[command(flatten)]
manifest: clap_cargo::Manifest,
#[command(flatten)]
workspace: clap_cargo::Workspace,
#[command(flatten)]
features: clap_cargo::Features,
}
Relevant crates
Other crates that might be useful for cargo plugins:
- escargot for wrapping
cargo-build
,carg-run
,cargo-test
, etc. - cargo_metadata for getting crate information.
- clap-verbosity for adding logging to your CLI.