From 63f2a13c0129892b6ce311ba96931d9612c8e878 Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Tue, 31 Mar 2020 16:10:48 -0400 Subject: [PATCH] step 4: make features do the right thing --- tower/Cargo.toml | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/tower/Cargo.toml b/tower/Cargo.toml index fe3de16db..b879326cd 100644 --- a/tower/Cargo.toml +++ b/tower/Cargo.toml @@ -26,35 +26,36 @@ edition = "2018" [features] default = ["log"] log = ["tracing/log"] -balance = ["discover", "load", "ready-cache", "make"] -buffer = [] +balance = ["discover", "load", "ready-cache", "make", "rand", "slab"] +buffer = ["tokio/sync", "tokio/rt-core"] discover = [] filter = [] -hedge = ["filter"] -limit = [] -load = ["discover"] +hedge = ["filter", "futures-util", "hdrhistogram", "tokio/time"] +limit = ["tokio/time"] +load = ["discover", "tokio/time"] load-shed = [] -make = [] -ready-cache = [] -reconnect = ["make"] -retry = [] -spawn-ready = [] -timeout = [] -util = [] +make = ["tokio/io-std"] +ready-cache = ["futures-util", "indexmap", "tokio/sync"] +reconnect = ["make", "tokio/io-std"] +retry = ["tokio/time"] +spawn-ready = ["futures-util", "tokio/sync", "tokio/rt-core"] +timeout = ["tokio/time"] +util = ["futures-util"] [dependencies] futures-core = "0.3" -futures-util = { version = "0.3", default-features = false, features = ["alloc"] } -hdrhistogram = "6.0" -indexmap = "1.0.2" pin-project = "0.4" -rand = { version = "0.7", features = ["small_rng"] } -slab = "0.4" -tokio = { version = "0.2", features = ["rt-core", "sync", "time"] } tower-layer = { version = "0.3", path = "../tower-layer" } tower-service = { version = "0.3", path = "../tower-service" } tracing = "0.1.2" +futures-util = { version = "0.3", default-features = false, features = ["alloc"], optional = true } +hdrhistogram = { version = "6.0", optional = true } +indexmap = { version = "1.0.2", optional = true } +rand = { version = "0.7", features = ["small_rng"], optional = true } +slab = { version = "0.4", optional = true } +tokio = { version = "0.2", optional = true } + [dev-dependencies] futures-util = { version = "0.3", default-features = false, features = ["alloc"] } hdrhistogram = "6.0"