8 releases
Uses new Rust 2024
| 0.2.4 | May 15, 2025 |
|---|---|
| 0.2.3 | May 15, 2025 |
| 0.1.6 | May 15, 2025 |
#624 in Embedded development
132 downloads per month
73KB
1.5K
SLoC
nospin
Rust crate containing an embedded version of a Mutex which can be used in
no_std projects which are single-threaded.
lib.rs:
This crate provides non thread-safe versions of the primitives in std::sync and std::lazy
suitable for use in single-threaded no_std environments.
Features
-
Mutex,RwLock,Once/SyncOnceCell, andSyncLazyequivalents -
Support for
no_stdenvironments -
lock_apicompatibility -
Upgradeable
RwLockguards -
Guards can be sent and shared between threads
-
Guard leaking
Relationship with std::sync
While spin is not a drop-in replacement for std::sync an effort has been
made to keep this crate reasonably consistent with std::sync.
Feature flags
The crate comes with a few feature flags that you may wish to use.
lock_apienables support forlock_api
Dependencies
~0–3.5MB
~50K SLoC