[package] name = "async-rate-limiter" version = "1.1.0" edition = "2021" license-file = "LICENSE" description = "Implements a token bucket algorithm that can be used to limit API access frequency. Written in pure Rust." homepage = "https://github.com/mindeng/async-rate-limiter" repository = "https://github.com/mindeng/async-rate-limiter" [dependencies] futures = "0.3.30" tokio = {version = "1", features = ["time", "rt"], optional = true} tokio-stream = {version = "0.1", features = ["time"], optional = true} # use "unstable" features to enable `interval` function async-std = {version = "1", optional = true, features = ["unstable"]} [features] default = ["rt-tokio"] # Run `cargo t` to test this feature rt-tokio = ["tokio", "tokio-stream"] # Run `cargo t --features rt-async-std --no-default-features` to test this feature rt-async-std = ["async-std"] [dev-dependencies] tokio = {version = "1", features = ["time", "rt", "rt-multi-thread", "macros"]}