Cargo Features

[dependencies]
limitador = { version = "0.6.0", default-features = false, features = ["disk_storage", "redis_storage", "infinispan_storage", "lenient_conditions"] }

We make redis and infinispan optional to be able to compile for wasm32.

default = disk_storage, redis_storage

These default features are set whenever limitador is added without default-features = false somewhere in the dependency tree.

disk_storage default = rocksdb

Affects keys::bin, storage::disk

redis_storage default = r2d2, redis, tokio

Affects storage::redis

infinispan_storage = base64, infinispan, reqwest, tokio

Affects storage::infinispan

lenient_conditions

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

rocksdb disk_storage

Enables rocksdb

Optional dependencies

redis redis_storage
r2d2 redis_storage
tokio infinispan_storage? redis_storage

Enables tokio

wasm_storage tests use tokio::test

infinispan infinispan_storage?
reqwest infinispan_storage?

Enables reqwest ^0.11

base64 infinispan_storage?