[package] name = "limitador" version = "0.7.0" authors = ["David Ortiz ", "Eguzki Astiz Lezaun ", "Alex Snaps "] license = "Apache-2.0" keywords = ["rate-limiting", "rate", "limiter"] categories = ["web-programming"] description = "Rate limiting library" homepage = "https://kuadrant.io" repository = "https://github.com/kuadrant/limitador" documentation = "https://docs.rs/limitador" readme = "README.md" edition = "2021" [features] default = ["disk_storage", "redis_storage"] disk_storage = ["rocksdb"] distributed_storage = ["tokio", "tokio-stream", "h2", "base64", "uuid", "tonic", "tonic-reflection", "prost", "prost-types"] redis_storage = ["redis", "r2d2", "tokio"] lenient_conditions = [] [dependencies] moka = { version = "0.12", features = ["sync"] } dashmap = "5.5.3" getrandom = { version = "0.2", features = ["js"] } serde = { version = "1", features = ["derive", "rc"] } postcard = { version = "1.0.4", features = ["use-std"] } serde_json = "1" rmp-serde = "1.1.0" thiserror = "1" futures = "0.3" async-trait = "0.1" cfg-if = "1" tracing = "0.1.40" metrics = "0.22.3" # Optional dependencies rocksdb = { version = "0.22", optional = true, features = ["multi-threaded-cf"] } redis = { version = "0.25", optional = true, features = [ "connection-manager", "tokio-comp", "tls-native-tls", "tokio-native-tls-comp", ] } r2d2 = { version = "0.8", optional = true } tokio = { version = "1", optional = true, features = [ "rt-multi-thread", "macros", "time", ] } base64 = { version = "0.22", optional = true } tokio-stream = { version = "0.1", optional = true } h2 = { version = "0.3", optional = true } uuid = { version = "1.8.0", features = ["v4", "fast-rng"], optional = true } tonic = { version = "0.11", optional = true } tonic-reflection = { version = "0.11", optional = true } prost = { version = "0.12", optional = true } prost-types = { version = "0.12", optional = true } time = "0.3.36" [dev-dependencies] serial_test = "3.0" criterion = { version = "0.5.1", features = ["html_reports", "async_tokio"] } redis-test = { version = "0.4.0", features = ["aio"] } redis = { version = "0.25", features = [ "connection-manager", "tokio-comp", "tls-native-tls", "tokio-native-tls-comp", ] } paste = "1" rand = "0.8" tempfile = "3.5.0" tokio = { version = "1", features = [ "rt-multi-thread", "macros", "time", ] } [build-dependencies] tonic-build = "0.11" [[bench]] name = "bench" path = "benches/bench.rs" harness = false