-
-
Notifications
You must be signed in to change notification settings - Fork 73
/
Cargo.toml
106 lines (89 loc) · 3.54 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
[package]
name = "moka"
version = "0.8.6"
edition = "2018"
rust-version = "1.51"
description = "A fast and concurrent cache library inspired by Caffeine (Java)"
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 = [".circleci", ".devcontainer", ".github", ".gitpod.yml", ".vscode"]
build = "build.rs"
[features]
default = ["atomic64", "quanta"]
# Enable this feature to use `moka::future::Cache`.
future = ["async-io", "async-lock", "futures-util"]
# Enable this feature to use **experimental** `moka::dash::Cache`.
# Please note that the APIs for this feature will be frequently changed in next
# few releases.
dash = ["dashmap"]
# 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 purpose.
unstable-debug-counters = ["future"]
[dependencies]
crossbeam-channel = "0.5.4"
crossbeam-utils = "0.8"
num_cpus = "1.13"
once_cell = "1.7"
parking_lot = "0.12"
scheduled-thread-pool = "0.2.5"
smallvec = "1.8"
tagptr = "0.2"
thiserror = "1.0"
uuid = { version = "1.1", features = ["v4"] }
# Although v0.8.2 is not the current version (v0.9.x), we will keep using it until
# we perform enough tests to get conformable with memory safety.
# See: https://github.com/moka-rs/moka/issues/34
crossbeam-epoch = "0.8.2"
# Opt-out serde and stable_deref_trait features
# https://github.com/Manishearth/triomphe/pull/5
triomphe = { version = "0.1", default-features = false }
# Optional dependencies (quanta, enabled by default)
quanta = { version = "0.10.0", optional = true }
# Optional dependencies (dashmap)
dashmap = { version = "5.2", optional = true }
# Optional dependencies (future)
async-io = { version = "1.4", optional = true }
async-lock = { version = "2.4", optional = true }
futures-util = { version = "0.3", optional = true }
[dev-dependencies]
actix-rt = { version = "2.7", default-features = false }
async-std = { version = "1.11", features = ["attributes"] }
getrandom = "0.2"
reqwest = "0.11.11"
skeptic = "0.13"
tokio = { version = "1.19", features = ["rt-multi-thread", "macros", "sync", "time" ] }
[target.'cfg(trybuild)'.dev-dependencies]
trybuild = "1.0"
[target.'cfg(skeptic)'.build-dependencies]
skeptic = "0.13.5"
# https://docs.rs/about/metadata
[package.metadata.docs.rs]
# Build the doc with some features enabled.
features = ["future", "dash"]
rustdoc-args = ["--cfg", "docsrs"]
# ----------------------------------
# RUSTSEC, etc.
#
# crossbeam-channel:
# - Workaround a bug in upstream related to TLS access on AArch64 Linux:
# - https://github.com/crossbeam-rs/crossbeam/pull/802 (Patched >= 0.5.4)
# - Addressed some stacked borrow violations found by Miri:
# - https://github.com/crossbeam-rs/crossbeam/blob/master/crossbeam-channel/CHANGELOG.md#version-052 (Patched >= 0.5.2)
#
# smallvec:
# - https://rustsec.org/advisories/RUSTSEC-2021-0003.html (Patched >= 1.6.1)
#
# Tokio:
# - https://rustsec.org/advisories/RUSTSEC-2021-0124.html (Patched >= 1.13.1)
# - https://rustsec.org/advisories/RUSTSEC-2021-0072.html (Patched >= 1.8.1)