throttle-kit 0.4.0

Rate limiting for Rust — GCRA algorithm with in-memory and Redis backends, Tower layer integration
Documentation
# 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.85"
name = "throttle-kit"
version = "0.4.0"
build = false
exclude = [
    "/target",
    "/fuzz",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Rate limiting for Rust — GCRA algorithm with in-memory and Redis backends, Tower layer integration"
readme = "README.md"
keywords = [
    "rate-limit",
    "gcra",
    "throttle",
]
categories = ["web-programming"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/WyattAu/ratelimit"

[features]
default = ["in-memory"]
in-memory = ["dep:dashmap"]
metrics = ["dep:metrics"]
redis = ["dep:redis"]
sliding-window = ["dep:dashmap"]
sqlite = ["dep:rusqlite"]
tower = [
    "dep:tower",
    "dep:tower-layer",
    "dep:http",
    "dep:axum",
]

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

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

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

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

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

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

[dependencies.axum]
version = "0.8"
optional = true

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

[dependencies.http]
version = "1"
optional = true

[dependencies.metrics]
version = "0.24"
optional = true

[dependencies.redis]
version = "0.25"
features = [
    "tokio-comp",
    "connection-manager",
]
optional = true

[dependencies.rusqlite]
version = "0.31"
features = ["bundled"]
optional = true

[dependencies.thiserror]
version = "2"

[dependencies.tokio]
version = "1"
features = [
    "time",
    "sync",
    "rt",
]

[dependencies.tower]
version = "0.5"
optional = true

[dependencies.tower-layer]
version = "0.3"
optional = true

[dependencies.tracing]
version = "0.1"

[dev-dependencies.criterion]
version = "0.5"
features = ["html_reports"]

[dev-dependencies.proptest]
version = "1"

[dev-dependencies.tokio]
version = "1"
features = ["full"]

[lints.clippy]
expect_used = "warn"
indexing_slicing = "deny"
panic = "deny"
unwrap_used = "deny"