-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
100 lines (90 loc) · 2.33 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
[workspace]
members = ["kash_macros"]
[package]
name = "kash"
version = "0.4.1"
authors = ["Omid Rad <[email protected]>", "James Kominick <[email protected]>"]
description = "Function and method cache and memoization"
repository = "https://github.com/omid/kash"
documentation = "https://docs.rs/kash"
readme = "README.md"
categories = ["caching", "data-structures"]
keywords = ["cache", "memoize", "redis", "disk"]
license = "MIT"
edition = "2021"
rust-version = "1.76"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[features]
default = ["moka/sync"]
async = ["moka/future"]
redis_store = [
"dep:redis",
"dep:r2d2",
"dep:serde",
"dep:rmp-serde",
"kash_macros/redis_store",
]
redis_connection_manager = ["redis_store", "redis/connection-manager"]
redis_tokio = [
"redis_store",
"async",
"redis/aio",
"redis/tokio-comp",
"redis/tls",
"redis/tokio-native-tls-comp",
"tokio",
]
redis_ahash = ["redis_store", "redis/ahash"]
disk_store = [
"dep:sled",
"dep:serde",
"dep:rmp-serde",
"dep:directories",
"kash_macros/disk_store",
]
[dependencies]
async-trait = { version = "0.1" }
directories = { version = "5.0", optional = true }
kash_macros = { path = "kash_macros", version = "0.4" }
moka = { version = "0.12" }
once_cell = "1"
r2d2 = { version = "0.8", optional = true }
redis = { version = "0.27", features = ["r2d2"], optional = true }
rmp-serde = { version = "1.1", optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
sled = { version = "0.34", optional = true }
thiserror = "1"
tokio = { version = "1", features = [
"macros",
"time",
"sync",
"parking_lot",
], optional = true }
instant = { version = "0.1" }
[dev-dependencies]
copy_dir = "0.1"
googletest = "0.12"
serial_test = "3"
smartstring = "1"
tempfile = "3"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
[[example]]
name = "redis"
required-features = ["redis_store"]
[[example]]
name = "redis-async"
required-features = ["async"]
[[example]]
name = "tokio"
required-features = ["async"]
[[example]]
name = "disk"
required-features = ["disk_store"]
[lints.rust]
unsafe_code = { level = "forbid", priority = 2 }
rust_2018_idioms = "deny"
nonstandard-style = "deny"
future_incompatible = "deny"
#missing_docs = { level = "warn", priority = -1 }