blob: 3b2d1aa4601be66ba53823a8154898ed77193ed4 [file] [log] [blame]
Chih-Hung Hsiehca5c7552020-05-13 16:07:37 -07001[package]
2name = "once_cell"
David LeGare533bf132022-03-02 16:21:26 +00003version = "1.9.0"
Chih-Hung Hsiehca5c7552020-05-13 16:07:37 -07004authors = ["Aleksey Kladov <aleksey.kladov@gmail.com>"]
5license = "MIT OR Apache-2.0"
6edition = "2018"
7
8description = "Single assignment cells and lazy values."
9readme = "README.md"
10documentation = "https://docs.rs/once_cell"
11
12repository = "https://github.com/matklad/once_cell"
13keywords = ["lazy", "static"]
14categories = ["rust-patterns", "memory-management"]
15
Joel Galensone32d6ee2021-06-21 13:35:24 -070016exclude = ["*.png", "*.svg", "/Cargo.lock.msrv", "/.travis.yml", "/run-miri-tests.sh", "rustfmt.toml"]
Chih-Hung Hsiehca5c7552020-05-13 16:07:37 -070017
Haibo Huangdf3e3bf2020-11-10 20:08:07 -080018[workspace]
19members = ["xtask"]
20
Chih-Hung Hsiehca5c7552020-05-13 16:07:37 -070021[dependencies]
22# Uses parking_lot to implement once_cell::sync::OnceCell.
23# This makes not speed difference, but makes each OnceCell<T>
Elliott Hughese116d732021-04-01 16:26:32 -070024# for up to 16 bytes smaller, depending on the size of the T.
Haibo Huange42d5d82020-08-17 15:40:07 -070025parking_lot = { version = "0.11", optional = true, default_features = false }
Chih-Hung Hsiehca5c7552020-05-13 16:07:37 -070026
David LeGare533bf132022-03-02 16:21:26 +000027# To be used in order to enable the race feature on targets
28# that do not have atomics
29# *Warning:* This can be unsound. Please read the README of
30# [atomic-polyfill](https://github.com/embassy-rs/atomic-polyfill)
31# and make sure you understand all the implications
32atomic-polyfill = { version = "0.1", optional = true }
33
Chih-Hung Hsiehca5c7552020-05-13 16:07:37 -070034[dev-dependencies]
35lazy_static = "1.0.0"
Haibo Huang0f3d5c22020-05-18 15:50:55 -070036crossbeam-utils = "0.7.2"
Chih-Hung Hsiehca5c7552020-05-13 16:07:37 -070037regex = "1.2.0"
38
39[features]
40default = ["std"]
41# Enables `once_cell::sync` module.
Haibo Huangdc66c862020-11-12 06:55:59 -080042std = ["alloc"]
Elliott Hughese116d732021-04-01 16:26:32 -070043# Enables `once_cell::race::OnceBox` type.
44alloc = ["race"]
45# Enables `once_cell::race` module.
46race = []
47# Enables semver-exempt APIs of this crate.
48# At the moment, this feature is unused.
Haibo Huangdf3e3bf2020-11-10 20:08:07 -080049unstable = []
Chih-Hung Hsiehca5c7552020-05-13 16:07:37 -070050
51[[example]]
52name = "bench"
53required-features = ["std"]
54
55[[example]]
56name = "bench_acquire"
57required-features = ["std"]
58
59[[example]]
60name = "bench_vs_lazy_static"
61required-features = ["std"]
62
63[[example]]
64name = "lazy_static"
65required-features = ["std"]
66
67[[example]]
68name = "reentrant_init_deadlocks"
69required-features = ["std"]
70
71[[example]]
72name = "regex"
73required-features = ["std"]
74
75[[example]]
76name = "test_synchronization"
77required-features = ["std"]
Haibo Huangdf3e3bf2020-11-10 20:08:07 -080078
79[package.metadata.docs.rs]
80all-features = true