cachekit-rs 0.3.0

Production-ready Redis caching for Rust. Supports cachekit.io SaaS, Redis, and Cloudflare Workers.
Documentation
[package]
name = "cachekit-rs"
version = "0.3.0"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
description = "Production-ready Redis caching for Rust. Supports cachekit.io SaaS, Redis, and Cloudflare Workers."
readme = "../../README.md"
homepage = "https://cachekit.io"
keywords = ["cache", "redis", "encryption", "moka", "cloudflare-workers"]
categories = ["caching", "web-programming", "cryptography"]

[lib]
name = "cachekit"

[features]
default = ["cachekitio", "encryption", "l1"]
cachekitio = ["dep:reqwest", "dep:serde_json"]
redis = ["dep:fred"]
workers = ["dep:worker", "dep:js-sys", "dep:getrandom"]
# cachekit-core 0.2 folds aes-gcm into the `encryption` feature automatically on wasm32.
# No separate `cachekit-core/wasm` activation needed.
encryption = ["cachekit-core/encryption"]
l1 = ["dep:moka"]
macros = ["dep:cachekit-macros"]
# Opt into ?Send / Rc on native targets (for tokio::task::LocalSet, single-threaded
# runtimes, etc.). Same code paths that wasm32 already uses.
unsync = []

[dependencies]
cachekit-core = { version = "0.2", features = ["messagepack"] }
serde = { version = "1", features = ["derive"] }
rmp-serde = "1"
thiserror = "2.0"
async-trait = "0.1"
blake2 = "0.10"
bytes = "1"
zeroize = { version = "1", features = ["derive"] }
urlencoding = "2"
hex = "0.4"
url = "2"
uuid = { version = "1", features = ["v4", "js"] }

# Optional: HTTP backend (native)
reqwest = { version = "0.12", optional = true, default-features = false, features = ["rustls-tls", "json"] }
serde_json = { version = "1", optional = true }

# Optional: Redis backend
fred = { version = "9", optional = true }

# Optional: L1 in-process cache
moka = { version = "0.12", optional = true, features = ["sync"] }

# Optional: Cloudflare Workers
worker = { version = "0.4", optional = true }
js-sys = { version = "0.3", optional = true }
getrandom = { version = "0.2", optional = true, features = ["js"] }

# Optional: proc-macro decorator
cachekit-macros = { version = "0.3.0", path = "../cachekit-macros", optional = true }

[dev-dependencies]
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
serde_json = "1"
serial_test = "3"

[lints]
workspace = true