Cargo Features
[dependencies]
once_cell_serde = { version = "1.20.3", default-features = false, features = ["std", "alloc", "race", "parking_lot", "portable-atomic", "critical-section", "unstable", "atomic-polyfill", "serde"] }
- default = std
-
The
std
feature is set by default wheneveronce_cell_serde
is added without
somewhere in the dependency tree.default-features = false - std default = alloc
-
Enables
sync
module.Affects
once_cell_serde::sync
… - alloc std = race
-
Enables
race::OnceBox
type. - race alloc?
-
Enables
race
module.Affects
once_cell_serde::race
… - parking_lot
-
Uses parking_lot to implement
sync::OnceCell
. This makes no speed difference, but makes each OnceCell<T> up to 16 bytes smaller, depending on the size of the T.Enables parking_lot_core
- portable-atomic critical-section?
-
Uses
portable-atomic
to implementrace
module. in#![no_std]
mode. Please readportable-atomic
docs carefully before enabling this feature.Enables portable-atomic
- critical-section atomic-polyfill? = portable-atomic
-
Uses
critical-section
to implementsync
module. in#![no_std]
mode. Please readcritical-section
docs carefully before enabling this feature.portable-atomic
feature is enabled for backwards compatibility.Enables critical-section
Affects
once_cell_serde::sync
… - unstable
-
Enables semver-exempt APIs of this crate.
At the moment, this feature is unused. - atomic-polyfill = critical-section
-
Only for backwards compatibility.