4 authors = ["Aleksey Kladov <aleksey.kladov@gmail.com>"]
5 license = "MIT OR Apache-2.0"
9 description = "Single assignment cells and lazy values."
11 documentation = "https://docs.rs/once_cell"
13 repository = "https://github.com/matklad/once_cell"
14 keywords = ["lazy", "static"]
15 categories = ["rust-patterns", "memory-management"]
17 exclude = ["*.png", "*.svg", "/Cargo.lock.msrv", "rustfmt.toml"]
23 # These optional dependencies are considered private impl details,
24 # only features from `[features]` table are a part of semver-guarded API.
25 parking_lot_core = { version = "0.9.3", optional = true, default_features = false }
26 atomic_polyfill = { package = "atomic-polyfill", version = "1", optional = true }
27 critical_section = { package = "critical-section", version = "1", optional = true }
31 crossbeam-utils = "0.8.7"
33 critical_section = { package = "critical-section", version = "1.1.1", features = ["std"] }
38 # Enables `once_cell::sync` module.
41 # Enables `once_cell::race::OnceBox` type.
44 # Enables `once_cell::race` module.
47 # Uses parking_lot to implement once_cell::sync::OnceCell.
48 # This makes no speed difference, but makes each OnceCell<T>
49 # up to 16 bytes smaller, depending on the size of the T.
50 parking_lot = ["parking_lot_core"]
52 # Uses `critical-section` to implement `sync` and `race` modules. in
53 # `#![no_std]` mode. Please read `critical-section` docs carefully
54 # before enabling this feature.
55 critical-section = ["critical_section", "atomic_polyfill" ]
57 # Enables semver-exempt APIs of this crate.
58 # At the moment, this feature is unused.
61 # Only for backwards compatibility.
62 atomic-polyfill = ["critical-section"]
66 required-features = ["std"]
69 name = "bench_acquire"
70 required-features = ["std"]
73 name = "bench_vs_lazy_static"
74 required-features = ["std"]
78 required-features = ["std"]
81 name = "reentrant_init_deadlocks"
82 required-features = ["std"]
86 required-features = ["std"]
89 name = "test_synchronization"
90 required-features = ["std"]
92 [package.metadata.docs.rs]