-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCargo.toml
78 lines (70 loc) · 2.45 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
[package]
name = "dist_lock"
description = "Distributed lock"
exclude = ["tests/"]
version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
readme.workspace = true
keywords.workspace = true
edition.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[workspace]
members = [".", "codegen"]
[workspace.package]
version = "0.0.1"
authors = ["tiny.wang <[email protected]>"]
license = "MIT"
homepage = "https://github.com/itinycheng/DistLock"
repository = "https://github.com/itinycheng/DistLock"
readme = "README.md"
keywords = ["distributed", "lock"]
edition = "2021"
[dependencies]
chrono = "0.4.26"
thiserror = "1.0.44"
gethostname = "0.4.3"
cfg-if = "1.0.0"
dist_lock_codegen = { path = "./codegen", version = "0.0.1", default-features = false, optional = true }
redis = { version = "0.23.0", optional = true }
diesel = { version = "2.1.0", features = ["chrono"], optional = true }
zookeeper = { version = "0.8.0", optional = true }
tokio = { version = "1.29.1", features = ["macros"], optional = true }
async-std = { version = "1.12.0", features = ["attributes"], optional = true }
async-trait = { version = "0.1.73", optional = true }
r2d2 = { version = "0.8.10", optional = true }
crossbeam-utils = { version = "0.8.16", optional = true }
[features]
default = ["redis_common"]
# redis
redis_common = ["redis/cluster", "dist_lock_codegen/redis"]
redis_r2d2 = ["redis_common", "redis/r2d2", "r2d2", "dist_lock_codegen/redis"]
redis_tokio = [
"redis/tokio-comp",
"redis/cluster-async",
"tokio/rt-multi-thread",
"async-trait",
"crossbeam-utils",
"dist_lock_codegen/redis",
"dist_lock_codegen/async",
]
redis_async_std = [
"redis/async-std-comp",
"redis/cluster-async",
"async-std",
"async-trait",
"crossbeam-utils",
"dist_lock_codegen/redis",
"dist_lock_codegen/async",
]
# diesel
diesel_sqlite = ["diesel/sqlite", "dist_lock_codegen/diesel"]
diesel_postgres = ["diesel/postgres", "dist_lock_codegen/diesel"]
diesel_mysql = ["diesel/mysql", "dist_lock_codegen/diesel"]
diesel_sqlite_r2d2 = ["diesel_sqlite", "diesel/r2d2", "r2d2", "dist_lock_codegen/diesel"]
diesel_postgres_r2d2 = ["diesel_postgres", "diesel/r2d2", "r2d2", "dist_lock_codegen/diesel"]
diesel_mysql_r2d2 = ["diesel_mysql", "diesel/r2d2", "r2d2", "dist_lock_codegen/diesel"]
# zookeeper
zookeeper = ["dep:zookeeper", "dist_lock_codegen/zookeeper"]