• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 colored error messages.
9 //! * **suggestions**: Turns on the `Did you mean '--myoption'?` feature for when users make typos.
10 //!
11 //! #### Optional features
12 //!
13 //! * **deprecated**: Guided experience to prepare for next breaking release (at different stages of development, this may become default)
14 //! * **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.
15 //! * **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).
16 //! * **env**: Turns on the usage of environment variables during parsing.
17 //! * **regex**: Enables regex validators.
18 //! * **unicode**: Turns on support for unicode characters (including emoji) in arguments and help messages.
19 //! * **wrap_help**: Turns on the help text wrapping feature, based on the terminal size.
20 //!
21 //! #### Experimental features
22 //!
23 //! **Warning:** These may contain breaking changes between minor releases.
24 //!
25 //! * **unstable-replace**: Enable [`Command::replace`](https://github.com/clap-rs/clap/issues/2836)
26 //! * **unstable-grouped**: Enable [`ArgMatches::grouped_values_of`](https://github.com/clap-rs/clap/issues/2924)
27 //! * **unstable-v4**: Preview features which will be stable on the v4.0 release
28