oxcache 0.2.0

A high-performance multi-level cache library for Rust with L1 (memory) and L2 (Redis) caching.
# 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 = "2021"
name = "oxcache"
version = "0.2.0"
authors = ["Kirky.X"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A high-performance multi-level cache library for Rust with L1 (memory) and L2 (Redis) caching."
readme = "README.md"
keywords = [
    "cache",
    "redis",
    "memory",
    "async",
    "performance",
]
categories = [
    "caching",
    "asynchronous",
    "database",
]
license = "MIT"
repository = "https://github.com/kirky-x/oxcache"

[features]
batch-write = ["dep:tokio-util"]
cli = [
    "dep:clap",
    "dep:dashmap",
    "dep:tracing",
    "metrics",
]
compression = ["dep:flate2"]
core = [
    "minimal",
    "redis",
    "futures",
]
default = ["full"]
full = [
    "core",
    "macros",
    "compression",
    "batch-write",
    "lua-script",
    "cli",
    "testing",
]
lua-script = ["redis"]
macros = ["dep:oxcache_macros"]
memory = [
    "dep:moka",
    "dep:dashmap",
]
metrics = [
    "dep:opentelemetry",
    "dep:opentelemetry_sdk",
    "dep:tracing-subscriber",
    "dep:tracing-opentelemetry",
    "dep:opentelemetry-otlp",
    "dep:chrono",
    "dep:tracing",
    "dep:dashmap",
]
minimal = [
    "memory",
    "tokio/time",
    "tracing",
    "metrics",
    "serialization",
    "dep:chrono",
]
redis = [
    "dep:redis",
    "dep:regex",
]
serialization = [
    "dep:serde",
    "dep:serde_json",
]
testing = []
tracing = ["dep:tracing"]

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

[[test]]
name = "backend_interface_test"
path = "tests/backend_interface_test.rs"

[[test]]
name = "chaos"
path = "tests/chaos.rs"

[[test]]
name = "e2e"
path = "tests/e2e.rs"

[[test]]
name = "integration"
path = "tests/integration.rs"

[[test]]
name = "performance"
path = "tests/performance.rs"

[[test]]
name = "security"
path = "tests/security.rs"

[[test]]
name = "unit"
path = "tests/unit.rs"

[[bench]]
name = "modern_api_benchmark"
path = "benches/modern_api_benchmark.rs"
harness = false

[[bench]]
name = "redis_benchmark"
path = "benches/redis_benchmark.rs"
harness = false

[dependencies.anyhow]
version = "~1.0"
optional = true

[dependencies.arc-swap]
version = "~1.9"

[dependencies.async-trait]
version = "0.1"

[dependencies.base64]
version = "0.22"
optional = false

[dependencies.chrono]
version = "~0.4"
features = [
    "serde",
    "clock",
]
optional = true
default-features = false

[dependencies.clap]
version = "4.6"
features = [
    "derive",
    "env",
]
optional = true

[dependencies.dashmap]
version = "6.2"
optional = true

[dependencies.flate2]
version = "1.1"
optional = true

[dependencies.futures]
version = "~0.3"
optional = true

[dependencies.lazy_static]
version = "1.5"

[dependencies.moka]
version = "0.12"
features = ["future"]
optional = true
default-features = false

[dependencies.once_cell]
version = "1.21"

[dependencies.opentelemetry]
version = "0.32"
optional = true

[dependencies.opentelemetry-otlp]
version = "0.32"
optional = true

[dependencies.opentelemetry_sdk]
version = "0.32"
optional = true

[dependencies.oxcache_macros]
version = "0.2.0"
optional = true

[dependencies.rand]
version = "0.10"

[dependencies.redis]
version = "~1.2"
features = [
    "aio",
    "tokio-comp",
    "connection-manager",
    "cluster-async",
    "sentinel",
]
optional = true
default-features = false

[dependencies.regex]
version = "~1.12"
optional = true

[dependencies.secrecy]
version = "~0.10"
features = ["serde"]

[dependencies.serde]
version = "~1.0"
features = ["derive"]
optional = true

[dependencies.serde_json]
version = "~1.0"
optional = true

[dependencies.thiserror]
version = "2.0"

[dependencies.tokio]
version = "~1.52"
features = [
    "rt",
    "rt-multi-thread",
    "sync",
    "time",
    "macros",
    "bytes",
]
default-features = false

[dependencies.tokio-util]
version = "~0.7"
optional = true

[dependencies.toml]
version = "~1.1"
optional = true

[dependencies.tracing]
version = "~0.1"
optional = true

[dependencies.tracing-opentelemetry]
version = "0.33"
optional = true

[dependencies.tracing-subscriber]
version = "~0.3"
features = [
    "env-filter",
    "fmt",
]
optional = true
default-features = false

[dependencies.uuid]
version = "~1.23"
features = ["v4"]

[dev-dependencies.criterion]
version = "~0.8"
features = ["async_tokio"]

[dev-dependencies.ctor]
version = "1.0"

[dev-dependencies.mockall]
version = "0.14.0"

[dev-dependencies.rand]
version = "0.10"

[dev-dependencies.serial_test]
version = "3.5"

[dev-dependencies.tempfile]
version = "3.27"

[dev-dependencies.testcontainers]
version = "0.27"

[dev-dependencies.testcontainers-modules]
version = "0.15"
features = ["redis"]

[lints.rust]
unexpected_cfgs = "allow"

[profile.bench]
inherits = "release"

[profile.dev]
opt-level = 0
debug = 2
incremental = true

[profile.dev.package.moka]
opt-level = 2

[profile.dev.package.redis]
opt-level = 2

[profile.dev.package.serde]
opt-level = 2

[profile.dev.package.serde_json]
opt-level = 2

[profile.dev.package.tokio]
opt-level = 2

[profile.dev-optimized]
opt-level = 2
debug = 2
inherits = "dev"

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "abort"
overflow-checks = false
strip = true

[profile.release.package."*"]
opt-level = 3

[profile.release-with-debug]
debug = 2
inherits = "release"
strip = false

[profile.test]
opt-level = 0
debug = 2