Crate features / spin
Feature flags · spin 0.12.3 · from crates.io 2026-10-24
spin features: what each one does, and the line to copy
Short answerspin 0.12.3 has 15 features. By default it turns on lock_api, mutex, spin_mutex, rwlock, once, lazylock, barrier; add default-features = false to start from nothing. It needs Rust 1.71 or newer.
Pick features
Every feature
| Feature | In default | Turns on |
|---|---|---|
barrier | yes | mutex |
fair_mutex | mutex | |
lazy | lazylock | |
lazylock | yes | once |
lock_api | yes | dep:lock_api_crate |
mutex | yes | nothing else (a switch the code checks) |
once | yes | nothing else (a switch the code checks) |
portable-atomic | dep:portable-atomic | |
portable_atomic | portable-atomic | |
rustc-dep-of-std | core | |
rwlock | yes | nothing else (a switch the code checks) |
spin_mutex | yes | mutex |
std | nothing else (a switch the code checks) | |
ticket_mutex | mutex | |
use_ticket_mutex | mutex, ticket_mutex |
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 spin declares (rust-version), and the release that changed it:
- 0.9.9 (2026-07-13): Rust 1.38
- 0.10.1 (2026-07-13): Rust 1.60
- 0.11.1 (2026-07-13): Rust 1.71
- 0.7.2 (2026-07-13): no rust-version declared
- 0.12.3 (2026-08-17): Rust 1.71
Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p spin --precise <version>, or use resolver 3, which picks compatible versions for you.
More on spin
Real downloads, dependents and alternatives: spin crate data (1.9M real downloads a day, 822 dependents).
Security record: spin advisories.
docs.rs feature list · crates.io · license MIT · edition 2021
Up next
Before you depend on itspin crate dataReal downloads, dependents, alternatives.Read it next →Did this answer your question?