blob: ee6fb0952aba4507b1eb9f130363dcc7699004be [file] [log] [blame]
Jeff Vander Stoepb00717e2020-12-04 13:34:19 +01001[package]
2name = "spin"
Joel Galenson7328d962021-08-09 10:44:07 -07003version = "0.9.2"
Jeff Vander Stoepb00717e2020-12-04 13:34:19 +01004authors = [
5 "Mathijs van de Nes <git@mathijs.vd-nes.nl>",
6 "John Ericson <git@JohnEricson.me>",
7 "Joshua Barretto <joshua.s.barretto@gmail.com>",
8]
9license = "MIT"
10repository = "https://github.com/mvdnes/spin-rs.git"
11keywords = ["spinlock", "mutex", "rwlock"]
12description = "Spin-based synchronization primitives"
13
14[dependencies]
15lock_api_crate = { package = "lock_api", version = "0.4", optional = true }
16
17[features]
Joel Galenson8d7807f2021-06-22 10:44:01 -070018default = ["lock_api", "mutex", "spin_mutex", "rwlock", "once", "lazy", "barrier"]
19
20# Enables `Mutex`. Must be used with either `spin_mutex` or `use_ticket_mutex`.
21mutex = []
22
23# Enables `SpinMutex` and the default spin mutex implementation for `Mutex`.
24spin_mutex = ["mutex"]
25
26# Enables `TicketMutex`.
27ticket_mutex = ["mutex"]
28
29# Enables the non-default ticket mutex implementation for `Mutex`.
30use_ticket_mutex = ["mutex", "ticket_mutex"]
31
32# Enables `RwLock`.
33rwlock = []
34
35# Enables `Once`.
36once = []
37
38# Enables `Lazy`.
39lazy = ["once"]
40
41# Enables `Barrier`. Because this feature uses `mutex`, either `spin_mutex` or `use_ticket_mutex` must be enabled.
42barrier = ["mutex"]
43
44# Enables `lock_api`-compatible types that use the primitives in this crate internally.
Jeff Vander Stoepb00717e2020-12-04 13:34:19 +010045lock_api = ["lock_api_crate"]
Joel Galenson8d7807f2021-06-22 10:44:01 -070046
47# Enables std-only features such as yield-relaxing.
Jeff Vander Stoepb00717e2020-12-04 13:34:19 +010048std = []
Joel Galenson8d7807f2021-06-22 10:44:01 -070049
50[package.metadata.docs.rs]
51all-features = true
52rustdoc-args = ["--cfg", "docsrs"]