Chih-Hung Hsieh | ca5c755 | 2020-05-13 16:07:37 -0700 | [diff] [blame] | 1 | [package] |
| 2 | name = "once_cell" |
David LeGare | 533bf13 | 2022-03-02 16:21:26 +0000 | [diff] [blame] | 3 | version = "1.9.0" |
Chih-Hung Hsieh | ca5c755 | 2020-05-13 16:07:37 -0700 | [diff] [blame] | 4 | authors = ["Aleksey Kladov <aleksey.kladov@gmail.com>"] |
| 5 | license = "MIT OR Apache-2.0" |
| 6 | edition = "2018" |
| 7 | |
| 8 | description = "Single assignment cells and lazy values." |
| 9 | readme = "README.md" |
| 10 | documentation = "https://docs.rs/once_cell" |
| 11 | |
| 12 | repository = "https://github.com/matklad/once_cell" |
| 13 | keywords = ["lazy", "static"] |
| 14 | categories = ["rust-patterns", "memory-management"] |
| 15 | |
Joel Galenson | e32d6ee | 2021-06-21 13:35:24 -0700 | [diff] [blame] | 16 | exclude = ["*.png", "*.svg", "/Cargo.lock.msrv", "/.travis.yml", "/run-miri-tests.sh", "rustfmt.toml"] |
Chih-Hung Hsieh | ca5c755 | 2020-05-13 16:07:37 -0700 | [diff] [blame] | 17 | |
Haibo Huang | df3e3bf | 2020-11-10 20:08:07 -0800 | [diff] [blame] | 18 | [workspace] |
| 19 | members = ["xtask"] |
| 20 | |
Chih-Hung Hsieh | ca5c755 | 2020-05-13 16:07:37 -0700 | [diff] [blame] | 21 | [dependencies] |
| 22 | # Uses parking_lot to implement once_cell::sync::OnceCell. |
| 23 | # This makes not speed difference, but makes each OnceCell<T> |
Elliott Hughes | e116d73 | 2021-04-01 16:26:32 -0700 | [diff] [blame] | 24 | # for up to 16 bytes smaller, depending on the size of the T. |
Haibo Huang | e42d5d8 | 2020-08-17 15:40:07 -0700 | [diff] [blame] | 25 | parking_lot = { version = "0.11", optional = true, default_features = false } |
Chih-Hung Hsieh | ca5c755 | 2020-05-13 16:07:37 -0700 | [diff] [blame] | 26 | |
David LeGare | 533bf13 | 2022-03-02 16:21:26 +0000 | [diff] [blame] | 27 | # 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 |
| 32 | atomic-polyfill = { version = "0.1", optional = true } |
| 33 | |
Chih-Hung Hsieh | ca5c755 | 2020-05-13 16:07:37 -0700 | [diff] [blame] | 34 | [dev-dependencies] |
| 35 | lazy_static = "1.0.0" |
Haibo Huang | 0f3d5c2 | 2020-05-18 15:50:55 -0700 | [diff] [blame] | 36 | crossbeam-utils = "0.7.2" |
Chih-Hung Hsieh | ca5c755 | 2020-05-13 16:07:37 -0700 | [diff] [blame] | 37 | regex = "1.2.0" |
| 38 | |
| 39 | [features] |
| 40 | default = ["std"] |
| 41 | # Enables `once_cell::sync` module. |
Haibo Huang | dc66c86 | 2020-11-12 06:55:59 -0800 | [diff] [blame] | 42 | std = ["alloc"] |
Elliott Hughes | e116d73 | 2021-04-01 16:26:32 -0700 | [diff] [blame] | 43 | # Enables `once_cell::race::OnceBox` type. |
| 44 | alloc = ["race"] |
| 45 | # Enables `once_cell::race` module. |
| 46 | race = [] |
| 47 | # Enables semver-exempt APIs of this crate. |
| 48 | # At the moment, this feature is unused. |
Haibo Huang | df3e3bf | 2020-11-10 20:08:07 -0800 | [diff] [blame] | 49 | unstable = [] |
Chih-Hung Hsieh | ca5c755 | 2020-05-13 16:07:37 -0700 | [diff] [blame] | 50 | |
| 51 | [[example]] |
| 52 | name = "bench" |
| 53 | required-features = ["std"] |
| 54 | |
| 55 | [[example]] |
| 56 | name = "bench_acquire" |
| 57 | required-features = ["std"] |
| 58 | |
| 59 | [[example]] |
| 60 | name = "bench_vs_lazy_static" |
| 61 | required-features = ["std"] |
| 62 | |
| 63 | [[example]] |
| 64 | name = "lazy_static" |
| 65 | required-features = ["std"] |
| 66 | |
| 67 | [[example]] |
| 68 | name = "reentrant_init_deadlocks" |
| 69 | required-features = ["std"] |
| 70 | |
| 71 | [[example]] |
| 72 | name = "regex" |
| 73 | required-features = ["std"] |
| 74 | |
| 75 | [[example]] |
| 76 | name = "test_synchronization" |
| 77 | required-features = ["std"] |
Haibo Huang | df3e3bf | 2020-11-10 20:08:07 -0800 | [diff] [blame] | 78 | |
| 79 | [package.metadata.docs.rs] |
| 80 | all-features = true |