1
1
[package ]
2
2
name = " tower"
3
3
# When releasing to crates.io:
4
- # - Remove path dependencies
5
- # - Update html_root_url.
6
4
# - Update doc url
7
5
# - Cargo.toml
8
6
# - README.md
@@ -25,6 +23,10 @@ edition = "2018"
25
23
26
24
[features ]
27
25
default = [" log" ]
26
+
27
+ # Internal
28
+ __common = [" futures-core" , " pin-project-lite" ]
29
+
28
30
full = [
29
31
" balance" ,
30
32
" buffer" ,
@@ -43,30 +45,30 @@ full = [
43
45
" timeout" ,
44
46
" util" ,
45
47
]
48
+ # FIXME: Use weak dependency once available (https://github.com/rust-lang/cargo/issues/8832)
46
49
log = [" tracing/log" ]
47
- balance = [" discover" , " load" , " ready-cache" , " make" , " rand" , " slab" , " tokio-stream " ]
48
- buffer = [" tokio/sync" , " tokio/rt" , " tokio-util" , " tracing" ]
49
- discover = []
50
- filter = [" futures-util" ]
50
+ balance = [" discover" , " load" , " ready-cache" , " make" , " rand" , " slab" ]
51
+ buffer = [" __common " , " tokio/sync" , " tokio/rt" , " tokio-util" , " tracing" ]
52
+ discover = [" __common " ]
53
+ filter = [" __common " , " futures-util" ]
51
54
hedge = [" util" , " filter" , " futures-util" , " hdrhistogram" , " tokio/time" , " tracing" ]
52
- limit = [" tokio/time" , " tokio/sync" , " tokio-util" , " tracing" ]
53
- load = [" tokio/time" , " tracing" ]
54
- load-shed = []
55
- make = [" tokio/io-std " , " futures-util " ]
56
- ready-cache = [" futures-util" , " indexmap" , " tokio/sync" , " tracing" ]
55
+ limit = [" __common " , " tokio/time" , " tokio/sync" , " tokio-util" , " tracing" ]
56
+ load = [" __common " , " tokio/time" , " tracing" ]
57
+ load-shed = [" __common " ]
58
+ make = [" futures-util " , " pin-project-lite " , " tokio/io-std " ]
59
+ ready-cache = [" futures-core " , " futures- util" , " indexmap" , " tokio/sync" , " tracing" ]
57
60
reconnect = [" make" , " tokio/io-std" , " tracing" ]
58
- retry = [" tokio/time" ]
59
- spawn-ready = [" futures-util" , " tokio/sync" , " tokio/rt" , " util" , " tracing" ]
60
- steer = [" futures-util " ]
61
- timeout = [" tokio/time" ]
62
- util = [" futures-util" ]
61
+ retry = [" __common " , " tokio/time" ]
62
+ spawn-ready = [" __common " , " futures-util" , " tokio/sync" , " tokio/rt" , " util" , " tracing" ]
63
+ steer = []
64
+ timeout = [" pin-project-lite " , " tokio/time" ]
65
+ util = [" __common " , " futures-util" , " pin-project " ]
63
66
64
67
[dependencies ]
65
- futures-core = " 0.3"
66
- pin-project = " 1"
67
68
tower-layer = { version = " 0.3.1" , path = " ../tower-layer" }
68
69
tower-service = { version = " 0.3.1" , path = " ../tower-service" }
69
70
71
+ futures-core = { version = " 0.3" , optional = true }
70
72
futures-util = { version = " 0.3" , default-features = false , features = [" alloc" ], optional = true }
71
73
hdrhistogram = { version = " 7.0" , optional = true }
72
74
indexmap = { version = " 1.0.2" , optional = true }
@@ -76,11 +78,13 @@ tokio = { version = "1", optional = true, features = ["sync"] }
76
78
tokio-stream = { version = " 0.1.0" , optional = true }
77
79
tokio-util = { version = " 0.6.3" , default-features = false , optional = true }
78
80
tracing = { version = " 0.1.2" , default-features = false , features = [" std" ], optional = true }
79
- pin-project-lite = " 0.2.7"
81
+ pin-project = { version = " 1" , optional = true }
82
+ pin-project-lite = { version = " 0.2.7" , optional = true }
80
83
81
84
[dev-dependencies ]
82
85
futures = " 0.3"
83
86
hdrhistogram = " 7.0"
87
+ pin-project-lite = " 0.2.7"
84
88
tokio = { version = " 1" , features = [" macros" , " sync" , " test-util" , " rt-multi-thread" ] }
85
89
tokio-stream = " 0.1"
86
90
tokio-test = " 0.4"
0 commit comments