https://github.com/oliver-giersch/conquer-once
This crate is very similar to, and is in fact directly inspired by, once-cell
but has a number of properties differentiating it:
- full
no-std
compatibility (once-cell
does not provide anysync
types in no-std mode) in a way that can be easily composed with other no-std crates (unlikelazy_static
): enabling thestd
cargo feature enables additional types using a low-level OS reliant blocking mechanism without overriding theno-std
capable types (which use spin-locks) - clear and consistent API distinctions between blocking and non-blocking initialization
- does not provide specific types for single-threaded initialization only (like the
unsync
module inonce-cell
)