Skip to main content

#
clap/
_features.rs

    1//! ## Documentation: Feature Flags
    2//!
    3//! Available [compile-time feature flags](https://doc.rust-lang.org/cargo/reference/features.html#dependency-features)
    4//!
    5//! #### Default Features
    6//!
    7//! * `std`: _Not Currently Used._ Placeholder for supporting `no_std` environments in a backwards compatible manner.
    8//! * `color`: Turns on terminal styling of help and error messages.  See
    9//!   [`Command::styles`][crate::Command::styles] to customize this.
    10//! * `help`: Auto-generate help output
    11//! * `usage`: Auto-generate usage
    12//! * `error-context`: Include contextual information for errors (which arg failed, etc)
    13//! * `suggestions`: Turns on the `Did you mean '--myoption'?` feature for when users make typos.
    14//!
    15//! #### Optional features
    16//!
    17//! * `deprecated`: Guided experience to prepare for next breaking release (at different stages of development, this may become default)
    18//! * `derive`: Enables the custom derive (i.e. `#[derive(Parser)]`). Without this you must use one of the other methods of creating a `clap` CLI listed above.
    19//! * `cargo`: Turns on macros that read values from [`CARGO_*` environment variables](https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates).
    20//! * `env`: Turns on the usage of environment variables during parsing.
    21//! * `unicode`: Turns on support for unicode characters (including emoji) in arguments and help messages.
    22//! * ``wrap_help``: Turns on the help text wrapping feature, based on the terminal size.
    23//! * `string`: Allow runtime generated strings (e.g. with [`Str`][crate::builder::Str]).
    24//!
    25//! #### Experimental features
    26//!
    27//! **Warning:** These may contain breaking changes between minor releases.
    28//!
    29//! * `unstable-v5`: Preview features which will be stable on the v5.0 release