NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #27 most downloaded on crates.io
Single assignment cells and lazy values.
Last release 7 months ago
12 Mar 2026
Release timing varies
gaps range from 2 weeks to 12 months
Most releases are documented
notes for 46 of 53 stable releases
8 versions withdrawn
withdrawn after publishing
8 years old
67 releases · first in 2018
Fix unsoundness in OnceCell::wait under --features=parking_lot, #295.
Fix unsoundness in OnceCell::wait under --features=parking_lot, #295.
If thread A calls wait, while thread B calls get_or_try_init(f), and, furthermore, f panics,
the wait incorrectly returns and thread A observes uninitialized memory.
Kudos to @meng-xu-cs for a nice find!
Outline more initialization in race: #284, #285.
One column per quarter.
Relax success ordering from AcqRel to Release in race: #278.
race: #278.- Reduce MSRV to 1.65: #277.
Outline initialization in race: #273.
Nothing published for this version
Remove portable_atomic from Cargo.lock if it is not, in fact, used: #267 This is a work-around for this cargo bug: https://github.com/rust-lang/cargo/
portable_atomic from Cargo.lock if it is not, in fact, used: #267
This is a work-around for this cargo bug: https://github.com/rust-lang/cargo/issues/10801.Allow using race module using just portable_atomic, without critical_section and provide better error messages on targets without atomic CAS instructi
race module using just portable_atomic, without critical_section and provide
better error messages on targets without atomic CAS instruction,
#265.Merge pull request #260 from brodycj/propagate-critical-section-to-po…
Merge pull request #260 from brodycj/propagate-critical-section-to-po…
Use portable-atomic instead of atomic-polyfill, #251.
portable-atomic instead of atomic-polyfill, #251.MSRV is updated to 1.60.0 to take advantage of dep: syntax for cargo features, removing "implementation details" from publicly visible surface.
MSRV is updated to 1.60.0 to take advantage of dep: syntax for cargo features,
removing "implementation details" from publicly visible surface.Avoid unnecessary synchronization in Lazy::{force,deref}_mut(), #231.
Lazy::{force,deref}_mut(), #231.Make OnceRef implementation compliant with strict provenance.
OnceRef implementation compliant with strict provenance.Add race::OnceRef for storing a &'a T.
race::OnceRef for storing a &'a T.Deprecate atomic-polyfill feature (use the new critical-section instead)
no_std implementation based on critical-section,
#195.atomic-polyfill feature (use the new critical-section instead)Nothing published for this version
Increase minimal supported Rust version to 1.56.0.
UnwindSafe even if the std feature is disabled.Nothing published for this version
Add extension to unsync and sync Lazy mut API:
unsync and sync Lazy mut API:
force_mutget_mutMake implementation compliant with strict provenance.
atomic-polyfill to 1.0Add Lazy::get, similar to OnceCell::get.
Lazy::get, similar to OnceCell::get.- Remove incorrect debug_assert.
debug_assert.Add OnceCell::wait, a blocking variant of get.
OnceCell::wait, a blocking variant of get.Nothing published for this version
Add OnceCell::with_value to create initialized OnceCell in const context.
OnceCell::with_value to create initialized OnceCell in const context.Clone implementation for OnceCell.parking_lot version on top of parking_lot_core, for even smaller cells!upgrade parking_lot to 0.12.0 (note that this bumps MSRV with parking_lot feature enabled to 1.49.0).
parking_lot to 0.12.0 (note that this bumps MSRV with parking_lot feature enabled to 1.49.0).Added an atomic-polyfill optional dependency to compile race on platforms without atomics
atomic-polyfill optional dependency to compile race on platforms without atomicsAdd try_insert API -- a version of set that returns a reference.
try_insert API -- a version of set that returns a reference.Nothing published for this version
Improve code size when using parking_lot feature.
Fix race::OnceBox to also impl Default even if T doesn't impl Default.
race::OnceBox<T> to also impl Default even if T doesn't impl Default.Hide the race module behind (default) race feature. Turns out that adding race by default was a breaking change on some platforms without atomics. In…
race module behind (default) race feature.
Turns out that adding race by default was a breaking change on some platforms without atomics.
In this release, we make the module opt-out.
Technically, this is a breaking change for those who use race with no_default_features.
Given that the race module itself only several days old, the breakage is deemed acceptable.Migrate from deprecated compare_and_swap to compare_exchange.
Lazy::into_valueonce_cell::race module for "first one wins" no_std-compatible initialization flavor.compare_and_swap to compare_exchange.OnceBox API uses Box . This a breaking change to unstable API.
OnceBox API uses Box<T>.
This a breaking change to unstable API.document once_cell::race module.
1.36.0.once_cell::race module.alloc feature for OnceBox.OnceBox::set.add new once_cell::race module for "first one wins" no_std-compatible initialization flavor. The API is provisional, subject to change and is gated by
once_cell::race module for "first one wins" no_std-compatible initialization flavor.
The API is provisional, subject to change and is gated by the unstable cargo feature.make sync::OnceCell pass https://doc.rust-lang.org/nomicon/dropck.html#an-escape-hatch[dropck] with parking_lot feature enabled. This fixes a (minor)
parking_lot to 0.11.0sync::OnceCell<T> pass https://doc.rust-lang.org/nomicon/dropck.html#an-escape-hatch[dropck] with parking_lot feature enabled.
This fixes a (minor) semver-incompatible changed introduced in 1.4.0upgrade parking_lot to 0.10 (note that this bumps MSRV with parking_lot feature enabled to 1.36.0).
parking_lot to 0.10 (note that this bumps MSRV with parking_lot feature enabled to 1.36.0).OnceCell::take.0.7.remove unnecessary F: fmt::Debug bound from impl fmt::Debug for Lazy .
F: fmt::Debug bound from impl fmt::Debug for Lazy<T, F>.update implementation according to the latest changes in std.
Lazy<T> now implements DerefMut.std.add sync::OnceCell::get_unchecked.
sync::OnceCell::get_unchecked.implement Default for Lazy: it creates an empty Lazy which is initialized with T::default on first access.
Default for Lazy: it creates an empty Lazy<T> which is initialized with T::default on first access.OnceCell::get_mut.actually add #![no_std] attribute if std feature is not enabled.
#![no_std] attribute if std feature is not enabled.fix unsoundness in Lazy if the initializing function panics. Thanks @xfix!
Lazy<T> if the initializing function panics. Thanks @xfix!RefUnwindSafe for Lazy.std and parking_lot implementations.remove parking_lot from the list of default features.
parking_lot from the list of default features.std default feature. Without std, only unsync module is supported.Eq for OnceCell.Sync bound on sync::Lazy.Nothing published for this version
Nothing published for this version
New implementation of sync::OnceCell if parking_lot feature is disabled. It now employs a hand-rolled variant of std::Once.
sync::OnceCell if parking_lot feature is disabled.
It now employs a hand-rolled variant of std::sync::Once.sync::OnceCell::get_or_try_init works without parking_lot as well!parking_lot feature: same performance but smaller types.Updated Lazy's Deref impl to requires only FnOnce instead of Fn
Lazy's Deref impl to requires only FnOnce instead of FnLazy requires only FnOnce instead of Fn
Lazy requires only FnOnce instead of Fnnicer fmt::Debug implementation
fmt::Debug implementationfix stacked borrows violation in unsync::OnceCell::get
parking_lot to 0.9.0unsync::OnceCell::getClone for sync::OnceCell<T> where T: Cloneadd OnceCell::into_inner which consumes a cell and returns an option
OnceCell::into_inner which consumes a cell and returns an optionimplement sync::OnceCell::get_or_try_init if parking_lot feature is enabled
sync::OnceCell::get_or_try_init if parking_lot feature is enabledunsafe implementation of sync::OnceCell from Once to Mutexsync::OnceCell::get_or_init is twice as fast if cell is already initializedstd::panic::RefUnwindSafe and std::panic::UnwindSafe for OnceCellLazy::new and OnceCell::new are now const-fns
Lazy::new and OnceCell::new are now const-fnsunsync_lazy and sync_lazy macros are removed- update crossbeam-utils to 0.6 - enable bors-ng
cells implement PartialEq and From
PartialEq and Fromparking_lot to 0.7.1unsync::OnceCell is Clone if T is Clone.
unsync::OnceCell<T> is Clone if T is Clone.No changelog until this point :(
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →