Crate features / clap
Feature flags · clap 4.6.7 · from crates.io 2026-10-24
clap features: what each one does, and the line to copy
Short answerclap 4.6.7 has 20 features. By default it turns on std, color, help, usage, error-context, suggestions; add default-features = false to start from nothing. It needs Rust 1.85 or newer.
Pick features
Every feature
| Feature | In default | Turns on |
|---|---|---|
cargo | clap_builder/cargo | |
color | yes | clap_builder/color |
debug | clap_builder/debug, clap_derive?/debug | |
deprecated | clap_builder/deprecated, clap_derive?/deprecated | |
derive | dep:clap_derive | |
env | clap_builder/env | |
error-context | yes | clap_builder/error-context |
help | yes | clap_builder/help |
std | yes | clap_builder/std |
string | clap_builder/string | |
suggestions | yes | clap_builder/suggestions |
unicode | clap_builder/unicode | |
unstable-derive-ui-tests | nothing else (a switch the code checks) | |
unstable-doc | clap_builder/unstable-doc, derive | |
unstable-ext | clap_builder/unstable-ext | |
unstable-markdown | clap_derive/unstable-markdown | |
unstable-styles | clap_builder/unstable-styles | |
unstable-v5 | clap_builder/unstable-v5, clap_derive?/unstable-v5, deprecated | |
usage | yes | clap_builder/usage |
wrap_help | clap_builder/wrap_help |
dep:x turns on the optional dependency x; x/y turns on feature y of dependency x (with ?, only if x is already on).
MSRV history
The minimum Rust version clap declares (rust-version), and the release that changed it:
- 3.2.0 (2022-06-13): Rust 1.56.0
- 3.2.6 (2022-06-21): Rust 1.56.1
- 4.0.0-rc.1 (2022-09-20): Rust 1.60.0
- 3.2.23 (2022-10-24): Rust 1.56.1
- 4.0.19 (2022-11-04): Rust 1.60.0
- 4.1.0 (2023-01-13): Rust 1.64.0
- 3.2.24 (2023-04-25): Rust 1.56.1
- 4.2.5 (2023-04-27): Rust 1.64.0
- 4.4.0 (2023-08-24): Rust 1.70.0
- 4.5.0 (2024-02-08): Rust 1.74
- 4.6.0 (2026-03-12): Rust 1.85
Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p clap --precise <version>, or use resolver 3, which picks compatible versions for you.
More on clap
Real downloads, dependents and alternatives: clap crate data (3.1M real downloads a day, 49,450 dependents).
docs.rs feature list · crates.io · license MIT OR Apache-2.0 · edition 2024
Up next
Before you depend on itclap crate dataReal downloads, dependents, alternatives.Read it next →Did this answer your question?