[workspace]
resolver = "2"
members = [".", "imc-derive"]

[package]
name = "imc"
version = "0.1.4"
description = "Trait-based, deduplicating, in-memory caching library for Rust"
license = "MIT"
repository = "https://github.com/gaurav1704/rust-imc"
edition = "2024"
rust-version = "1.85"

[features]
default = []
async = []
tokio = ["dep:tokio", "async"]
invalidation-redis = ["dep:redis"]
logging = ["dep:tracing"]
metrics-prometheus = ["dep:prometheus"]
critical = ["invalidation-redis", "dep:imc-derive"]

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

[dependencies]
redis = { version = "0.27", optional = true }
tokio = { version = "1", optional = true, features = ["rt", "rt-multi-thread"] }
tracing = { version = "0.1", optional = true }
prometheus = { version = "0.13", optional = true }
imc-derive = { path = "imc-derive", version = "0.1.4", optional = true }

[dev-dependencies]
serial_test = "3"
