-
-
Notifications
You must be signed in to change notification settings - Fork 73
/
Cargo.toml
169 lines (137 loc) · 4.38 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
[package]
name = "moka"
version = "0.12.8"
edition = "2021"
# Rust 1.65 was released on Nov 3, 2022.
rust-version = "1.65"
description = "A fast and concurrent cache library inspired by Java Caffeine"
license = "MIT OR Apache-2.0"
# homepage = "https://"
documentation = "https://docs.rs/moka/"
repository = "https://github.com/moka-rs/moka"
keywords = ["cache", "concurrent"]
categories = ["caching", "concurrency"]
readme = "README.md"
exclude = [".devcontainer", ".github", ".gitpod.yml", ".vscode"]
build = "build.rs"
[features]
default = ["atomic64", "quanta"]
# Enable this feature to use `moka::sync::{Cache, SegmentedCache}`
sync = []
# Enable this feature to use `moka::future::Cache`.
future = ["async-lock", "event-listener", "futures-util"]
# Enable this feature to activate optional logging from caches.
# Currently cache will emit log only when it encounters a panic in user provided
# callback closure.
logging = ["log"]
# This feature is enabled by default. Disable it when the target platform does not
# support `std::sync::atomic::AtomicU64`. (e.g. `armv5te-unknown-linux-musleabi`
# or `mips-unknown-linux-musl`)
# https://github.com/moka-rs/moka#resolving-compile-errors-on-some-32-bit-platforms
atomic64 = []
# This unstable feature adds `GlobalDebugCounters::current` function, which returns
# counters of internal object construction and destruction. It will have some
# performance impacts and is intended for debugging.
unstable-debug-counters = ["future", "once_cell"]
[dependencies]
crossbeam-channel = "0.5.5"
crossbeam-epoch = "0.9.9"
crossbeam-utils = "0.8"
parking_lot = "0.12"
smallvec = "1.8"
tagptr = "0.2"
thiserror = "1.0"
uuid = { version = "1.1", features = ["v4"] }
# Opt-out serde and stable_deref_trait features
# https://github.com/Manishearth/triomphe/pull/5
# 0.1.12 requires Rust 1.76
triomphe = { version = ">=0.1.3, <0.1.12", default-features = false }
# Optional dependencies (enabled by default)
quanta = { version = "0.12.2", optional = true }
# Optional dependencies (future)
async-lock = { version = "3.3", optional = true }
event-listener = { version = "5.3", optional = true }
futures-util = { version = "0.3.17", optional = true }
# Optional dependencies (logging)
log = { version = "0.4", optional = true }
# Optional dependencies (unstable-debug-counters)
once_cell = { version = "1.7", optional = true }
[dev-dependencies]
actix-rt = "2.8"
ahash = "0.8.3"
anyhow = "1.0.19"
async-std = { version = "1.12", features = ["attributes"] }
env_logger = "0.10.0"
getrandom = "0.2"
once_cell = "1.7"
paste = "1.0.9"
reqwest = { version = "0.11.11", default-features = false, features = ["rustls-tls"] }
tokio = { version = "1.19", features = ["fs", "io-util", "macros", "rt-multi-thread", "sync", "time" ] }
[target.'cfg(trybuild)'.dev-dependencies]
trybuild = "1.0"
[target.'cfg(rustver)'.build-dependencies]
rustc_version = "0.4.0"
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = [
"cfg(armv5te)",
"cfg(beta_clippy)",
"cfg(kani)",
"cfg(mips)",
"cfg(rustver)",
"cfg(skip_large_mem_tests)",
"cfg(trybuild)",
] }
# https://docs.rs/about/metadata
[package.metadata.docs.rs]
# Build the doc at docs.rs with some features enabled.
#
# You can test locally with:
# ```
# cargo +nightly -Z unstable-options --config 'build.rustdocflags="--cfg docsrs"' \
# doc --no-deps --features 'future, sync'
# ```
features = ["future", "sync"]
rustdoc-args = ["--cfg", "docsrs"]
# Examples
[[example]]
name = "append_value_async"
required-features = ["future"]
[[example]]
name = "append_value_sync"
required-features = ["sync"]
[[example]]
name = "basics_async"
required-features = ["future"]
[[example]]
name = "basics_sync"
required-features = ["sync"]
[[example]]
name = "bounded_counter_async"
required-features = ["future"]
[[example]]
name = "bounded_counter_sync"
required-features = ["sync"]
[[example]]
name = "cascading_drop_async"
required-features = ["future"]
[[example]]
name = "counter_async"
required-features = ["future"]
[[example]]
name = "counter_sync"
required-features = ["sync"]
[[example]]
name = "eviction_listener_sync"
required-features = ["sync"]
[[example]]
name = "reinsert_expired_entries_sync"
required-features = ["sync"]
[[example]]
name = "size_aware_eviction_sync"
required-features = ["sync"]
[[example]]
name = "try_append_value_async"
required-features = ["future"]
[[example]]
name = "try_append_value_sync"
required-features = ["sync"]