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-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 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 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

tokio:

stdin, stdout, stderr

Affects tower::make

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

Enables 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 rt of tokio

tokio:

Includes basic task execution capabilities

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. These features may have been created by mistake, and this functionality may be removed in the future.

futures-core buffer? discover? filter? limit? load? load-shed? ready-cache? retry? spawn-ready? util?
futures-util filter? hedge? make? ready-cache? spawn-ready? util?
hdrhistogram hedge?
indexmap ready-cache?

Enables indexmap ^1.0.2

rand balance?
slab balance?
tokio buffer? hedge? limit? load? make? ready-cache? reconnect? retry? spawn-ready? timeout?
tokio-stream implicit feature

Enables tokio-stream

tokio-stream:

Utilities to work with Stream and tokio

tokio-util buffer? limit?
tracing buffer? hedge? limit? load? log ready-cache? reconnect? spawn-ready?
pin-project util?
pin-project-lite buffer? discover? filter? limit? load? load-shed? make? ready-cache? retry? spawn-ready? timeout? util?