Crate features / smallvec
Feature flags · smallvec 1.16.4 · from crates.io 2026-10-24
smallvec features: what each one does, and the line to copy
Short answersmallvec 1.16.4 has 9 features. Nothing is on by default: turn on what you use.
Pick features
Every feature
| Feature | In default | Turns on |
|---|---|---|
const_generics | nothing else (a switch the code checks) | |
const_new | const_generics | |
drain_filter | nothing else (a switch the code checks) | |
drain_keep_rest | drain_filter | |
impl_bincode | bincode, unty | |
may_dangle | nothing else (a switch the code checks) | |
specialization | nothing else (a switch the code checks) | |
union | nothing else (a switch the code checks) | |
write | nothing else (a switch the code checks) |
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 smallvec declares (rust-version), and the release that changed it:
- 2.0.0-alpha.11 (2025-03-20): Rust 1.57
- 1.15.0 (2025-04-05): no rust-version declared
- 2.0.0-alpha.12 (2025-11-16): Rust 1.83
- 1.15.2 (2026-06-11): no rust-version declared
- 2.0.0-alpha.13 (2026-09-03): Rust 1.86
- 1.16.1 (2026-09-11): no rust-version declared
- 2.0.0-beta.1 (2026-09-20): Rust 1.86
- 1.16.2 (2026-09-25): no rust-version declared
- 2.0.0-beta.2 (2026-10-03): Rust 1.86
- 1.16.3 (2026-10-10): no rust-version declared
- 2.0.0-beta.3 (2026-10-16): Rust 1.86
- 1.16.4 (2026-10-23): no rust-version declared
Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p smallvec --precise <version>, or use resolver 3, which picks compatible versions for you.
More on smallvec
Real downloads, dependents and alternatives: smallvec crate data (3.9M real downloads a day, 4,345 dependents).
Security record: smallvec advisories.
docs.rs feature list · crates.io · license MIT OR Apache-2.0 · edition 2018
Up next
Before you depend on itsmallvec crate dataReal downloads, dependents, alternatives.Read it next →Did this answer your question?