The facade for building compiled Rust CLIs with usage.
Depend on usage-rs under the short crate name usage. That is the one package an
application needs: derive macros, the argv runtime, help, and clap-shaped errors ship in the
defaults. Completions stay behind a feature; low-level adopters that want only the binding
runtime keep depending on usage-argv directly.
[]
= { = "usage-rs", = "6" }
What happens after a parse can come from the same declaration: a command implements [Run],
the subcommand enum says #[usage(run)], and the match that routes argv to the code
carrying it out is generated rather than written. [RunWith] under #[usage(run_with)] hands
each command shared state, and [RunAsync] / [RunAsyncWith] under #[usage(run_async)] /
#[usage(run_async_with)] are the async pair. Nothing about any of it reaches the spec.
Enable portable expression validation only when a CLI declares validate rules:
= { = "usage-rs", = "6", = ["validation"] }
use usage_rs as usage;
#
use Cli;
#
#
#
#