Crate features / sha2
Feature flags · sha2 0.11.1 · from crates.io 2026-10-24
sha2 features: what each one does, and the line to copy
Short answersha2 0.11.1 has 3 features. By default it turns on alloc, oid; add default-features = false to start from nothing. It needs Rust 1.88 or newer.
Pick features
Every feature
| Feature | In default | Turns on |
|---|---|---|
alloc | yes | digest/alloc |
oid | yes | digest/oid |
zeroize | digest/zeroize |
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 sha2 declares (rust-version), and the release that changed it:
- 0.11.0-pre.0 (2024-01-08): Rust 1.71
- 0.11.0-pre.2 (2024-01-17): Rust 1.72
- 0.11.0-pre.5 (2025-03-05): Rust 1.85
- 0.10.9 (2025-04-30): no rust-version declared
- 0.11.0-rc.0 (2025-05-29): Rust 1.85
- 0.11.1 (2026-10-12): Rust 1.88
Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p sha2 --precise <version>, or use resolver 3, which picks compatible versions for you.
More on sha2
Real downloads, dependents and alternatives: sha2 crate data (3.5M real downloads a day, 22,608 dependents).
Security record: sha2 advisories.
docs.rs feature list · crates.io · license MIT OR Apache-2.0 · edition 2024
Up next
Before you depend on itsha2 crate dataReal downloads, dependents, alternatives.Read it next →Did this answer your question?