[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 "] 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"]