• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[package]
2name = "once_cell"
3version = "1.17.0"
4authors = ["Aleksey Kladov <aleksey.kladov@gmail.com>"]
5license = "MIT OR Apache-2.0"
6edition = "2021"
7rust-version = "1.56"
8
9description = "Single assignment cells and lazy values."
10readme = "README.md"
11documentation = "https://docs.rs/once_cell"
12
13repository = "https://github.com/matklad/once_cell"
14keywords = ["lazy", "static"]
15categories = ["rust-patterns", "memory-management"]
16
17exclude = ["*.png", "*.svg", "/Cargo.lock.msrv", "rustfmt.toml"]
18
19[workspace]
20members = ["xtask"]
21
22[dependencies]
23# These optional dependencies are considered private impl details,
24# only features from `[features]` table are a part of semver-guarded API.
25parking_lot_core = { version = "0.9.3", optional = true, default_features = false }
26atomic_polyfill = { package = "atomic-polyfill", version = "1", optional = true }
27critical_section = { package = "critical-section", version = "1", optional = true }
28
29[dev-dependencies]
30lazy_static = "1.0.0"
31crossbeam-utils = "0.8.7"
32regex =  "1.2.0"
33critical_section = { package = "critical-section", version = "1.1.1", features = ["std"] }
34
35[features]
36default = ["std"]
37
38# Enables `once_cell::sync` module.
39std = ["alloc"]
40
41# Enables `once_cell::race::OnceBox` type.
42alloc = ["race"]
43
44# Enables `once_cell::race` module.
45race = []
46
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.
50parking_lot = ["parking_lot_core"]
51
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.
55critical-section = ["critical_section", "atomic_polyfill" ]
56
57# Enables semver-exempt APIs of this crate.
58# At the moment, this feature is unused.
59unstable = []
60
61# Only for backwards compatibility.
62atomic-polyfill = ["critical-section"]
63
64[[example]]
65name = "bench"
66required-features = ["std"]
67
68[[example]]
69name = "bench_acquire"
70required-features = ["std"]
71
72[[example]]
73name = "bench_vs_lazy_static"
74required-features = ["std"]
75
76[[example]]
77name = "lazy_static"
78required-features = ["std"]
79
80[[example]]
81name = "reentrant_init_deadlocks"
82required-features = ["std"]
83
84[[example]]
85name = "regex"
86required-features = ["std"]
87
88[[example]]
89name = "test_synchronization"
90required-features = ["std"]
91
92[package.metadata.docs.rs]
93all-features = true
94