[package] name = "tower_governor" authors = ["Ben Wishovich "] description = "A rate-limiting middleware for Tower backed by the governor crate that allows configurable key based and global limits" repository = "https://github.com/benwis/tower-governor" license = "MIT OR Apache-2.0" readme = "README.md" version = "0.4.3" edition = "2021" keywords = ["axum", "tower", "tonic", "rate-limit", "governor"] categories = ["web-programming::http-server"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] forwarded-header-value = "0.1.1" governor = "0.6.0" http = "1.0.0" pin-project = "1.0.12" thiserror = "1.0.37" tower = "0.5.1" tracing = { version = "0.1.37", features = ["attributes"] } axum = { version = "0.7", optional = true } [dev-dependencies] tokio = { version = "1", features = ["macros", "rt-multi-thread"] } hyper = "1" reqwest = { version = "0.12", default-features = false, features = ["json"] } serde_json = "1.0.89" tower = { version = "0.5", features = ["util"] } tower-http = { version = "0.6", features = ["trace"] } tracing-subscriber = { version = "0.3.16", features = ["env-filter"] } [features] default = ["axum"] # Enables support for axum web framework axum = ["dep:axum"] # Enables tracing output for this middleware tracing = []