[package]
name = "rlock"
version = "0.0.10"
edition = "2024"
rust-version = "1.89"
repository = "https://github.com/magiclen/rlock"
homepage = "https://magiclen.org/rlock"
keywords = ["redis", "lock", "mutex", "distributed"]
categories = ["concurrency"]
description = "An easy-to-use Redis-backed lock library providing both async and sync Mutex, RwLock, and others."
license = "MIT"
include = ["src/**/*", "Cargo.toml", "README.md", "LICENSE"]

[dependencies]
redis = { version = "1", optional = true, default-features = false, features = ["script"] }

uuid = { version = "1", optional = true, features = ["v4"] }

tracing = { version = "0.1.6", optional = true }

# async
tokio = { version = "1.6", optional = true, default-features = false, features = ["macros", "rt", "sync", "time"] }
educe = { version = "0.7.3", optional = true, default-features = false, features = ["Debug"] }

[dev-dependencies]
tokio = { version = "1", default-features = false, features = ["rt-multi-thread", "test-util"] }
tracing-test = { version = "0.2", features = ["no-env-filter"] }

[features]
default = ["async"]
async = ["redis", "redis/tokio-comp", "redis/connection-manager", "dep:tokio", "dep:educe"]
sync = ["redis"]

redis = ["dep:redis", "dep:uuid", "dep:tracing"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]