# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

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

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

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

[lib]
name = "rlock"
path = "src/lib.rs"

[dependencies.educe]
version = "0.7.3"
features = ["Debug"]
optional = true
default-features = false

[dependencies.redis]
version = "1"
features = ["script"]
optional = true
default-features = false

[dependencies.tokio]
version = "1.6"
features = [
    "macros",
    "rt",
    "sync",
    "time",
]
optional = true
default-features = false

[dependencies.tracing]
version = "0.1.6"
optional = true

[dependencies.uuid]
version = "1"
features = ["v4"]
optional = true

[dev-dependencies.tokio]
version = "1"
features = [
    "rt-multi-thread",
    "test-util",
]
default-features = false

[dev-dependencies.tracing-test]
version = "0.2"
features = ["no-env-filter"]
