Crate features / bindgen
Feature flags · bindgen 0.73.2 · from crates.io 2026-10-24
bindgen features: what each one does, and the line to copy
Short answerbindgen 0.73.2 has 10 features. By default it turns on logging, prettyplease, runtime; add default-features = false to start from nothing. It needs Rust 1.71.0 or newer.
Pick features
Every feature
| Feature | In default | Turns on |
|---|---|---|
__cli | dep:clap, dep:clap_complete | |
__testing_only_extra_assertions | nothing else (a switch the code checks) | |
__testing_only_libclang_16 | nothing else (a switch the code checks) | |
__testing_only_libclang_20 | nothing else (a switch the code checks) | |
__testing_only_libclang_22 | nothing else (a switch the code checks) | |
experimental | dep:annotate-snippets | |
libcpp | clang-sys/libcpp | |
logging | yes | dep:log |
runtime | yes | clang-sys/runtime |
static | clang-sys/static |
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 bindgen declares (rust-version), and the release that changed it:
- 0.61.0 (2022-10-16): Rust 1.57.0
- 0.64.0 (2023-02-07): Rust 1.60.0
- 0.70.0 (2024-08-16): Rust 1.70.0
- 0.69.5 (2024-10-08): Rust 1.60.0
- 0.71.0 (2024-12-06): Rust 1.70.0
- 0.73.0 (2026-09-05): Rust 1.71.0
Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p bindgen --precise <version>, or use resolver 3, which picks compatible versions for you.
More on bindgen
Real downloads, dependents and alternatives: bindgen crate data (1M real downloads a day, 3,072 dependents).
docs.rs feature list · crates.io · license BSD-3-Clause · edition 2021
Up next
Before you depend on itbindgen crate dataReal downloads, dependents, alternatives.Read it next →Did this answer your question?