Cargo Features

[dependencies]
tower = { version = "0.4.13", default-features = false, features = ["full", "log", "balance", "buffer", "discover", "filter", "hedge", "limit", "load", "load-shed", "make", "ready-cache", "reconnect", "retry", "spawn-ready", "steer", "timeout", "util", "tokio", "tokio-stream"] }
default = log

The log feature is set by default whenever tower is added without default-features = false somewhere in the dependency tree.

full = balance, buffer, discover, filter, hedge, limit, load, load-shed, make, ready-cache, reconnect, retry, spawn-ready, steer, timeout, util
log default

FIXME: Use weak dependency once available (https://github.com/rust-lang/cargo/issues/8832)

Enables log of tracing

balance full? = discover, load, make, rand, ready-cache, slab

Affects tower::balance

buffer full? = futures-core, pin-project-lite, tokio-util, tracing

Enables sync and rt of tokio

Affects tower::buffer

discover balance? full? = futures-core, pin-project-lite

Affects tower::discover

filter full? hedge? = futures-core, futures-util, pin-project-lite

Affects tower::filter, util::ServiceExt.filter, util::ServiceExt.filter_async

hedge full? = filter, futures-util, hdrhistogram, tracing, util

Enables time of tokio

Affects tower::hedge

limit full? = futures-core, pin-project-lite, tokio-util, tracing

Enables time and sync of tokio

Affects tower::limit

load balance? full? = futures-core, pin-project-lite, tracing

Enables time of tokio

Affects tower::load

load-shed full? = futures-core, pin-project-lite

Affects tower::load_shed

make balance? full? reconnect? = futures-util, pin-project-lite

Enables io-std of tokio

Affects tower::make

ready-cache balance? full? = futures-core, futures-util, indexmap, pin-project-lite, tracing

Enables sync of tokio

Affects tower::ready_cache

reconnect full? = make, tracing

Enables io-std of tokio

Affects tower::reconnect

retry full? = futures-core, pin-project-lite

Enables time of tokio

Affects tower::retry

spawn-ready full? = futures-core, futures-util, pin-project-lite, tracing, util

Enables sync and rt of tokio

Affects tower::spawn_ready

steer full?

Affects tower::steer

timeout full? = pin-project-lite

Enables time of tokio

Affects tower::timeout

util full? hedge? spawn-ready? = futures-core, futures-util, pin-project, pin-project-lite

Affects tower::util

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

futures-core buffer? discover? filter? limit? load? load-shed? ready-cache? retry? spawn-ready? util?

With default (std)

futures-util filter? hedge? make? ready-cache? spawn-ready? util?

With alloc

hdrhistogram hedge?
indexmap ready-cache?

Enables indexmap ^1.0.2

rand balance?

With small_rng and default features

slab balance?

With default (std)

tokio implicit feature

With sync

tokio-stream implicit feature

With default (time)

tokio-util buffer? limit?
tracing buffer? hedge? limit? load? ready-cache? reconnect? spawn-ready?

With std

pin-project util?
pin-project-lite buffer? discover? filter? limit? load? load-shed? make? ready-cache? retry? spawn-ready? timeout? util?