-
Notifications
You must be signed in to change notification settings - Fork 260
/
Cargo.toml
105 lines (96 loc) · 3.32 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[package]
name = "tower"
# When releasing to crates.io:
# - Update doc url
# - Cargo.toml
# - README.md
# - Update CHANGELOG.md.
# - Create "vX.X.X" git tag.
version = "0.4.12"
authors = ["Tower Maintainers <team@tower-rs.com>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/tower-rs/tower"
homepage = "https://github.com/tower-rs/tower"
documentation = "https://docs.rs/tower/0.4.12"
description = """
Tower is a library of modular and reusable components for building robust
clients and servers.
"""
categories = ["asynchronous", "network-programming"]
keywords = ["io", "async", "non-blocking", "futures", "service"]
edition = "2018"
[features]
default = ["log"]
# Internal
__common = ["futures-core", "pin-project-lite"]
full = [
"balance",
"buffer",
"discover",
"filter",
"hedge",
"limit",
"load",
"load-shed",
"make",
"ready-cache",
"reconnect",
"retry",
"spawn-ready",
"steer",
"timeout",
"util",
]
# FIXME: Use weak dependency once available (https://github.com/rust-lang/cargo/issues/8832)
log = ["tracing/log"]
balance = ["discover", "load", "ready-cache", "make", "rand", "slab"]
buffer = ["__common", "tokio/sync", "tokio/rt", "tokio-util", "tracing"]
discover = ["__common"]
filter = ["__common", "futures-util"]
hedge = ["util", "filter", "futures-util", "hdrhistogram", "tokio/time", "tracing"]
limit = ["__common", "tokio/time", "tokio/sync", "tokio-util", "tracing"]
load = ["__common", "tokio/time", "tracing"]
load-shed = ["__common"]
make = ["futures-util", "pin-project-lite", "tokio/io-std"]
ready-cache = ["futures-core", "futures-util", "indexmap", "tokio/sync", "tracing"]
reconnect = ["make", "tokio/io-std", "tracing"]
retry = ["__common", "tokio/time"]
spawn-ready = ["__common", "futures-util", "tokio/sync", "tokio/rt", "util", "tracing"]
steer = []
timeout = ["pin-project-lite", "tokio/time"]
util = ["__common", "futures-util", "pin-project"]
[dependencies]
tower-layer = { version = "0.3.1", path = "../tower-layer" }
tower-service = { version = "0.3.1", path = "../tower-service" }
futures-core = { version = "0.3", optional = true }
futures-util = { version = "0.3", default-features = false, features = ["alloc"], optional = true }
hdrhistogram = { version = "7.0", optional = true }
indexmap = { version = "1.0.2", optional = true }
rand = { version = "0.8", features = ["small_rng"], optional = true }
slab = { version = "0.4", optional = true }
tokio = { version = "1.6", optional = true, features = ["sync"] }
tokio-stream = { version = "0.1.0", optional = true }
tokio-util = { version = "0.7.0", default-features = false, optional = true }
tracing = { version = "0.1.2", default-features = false, features = ["std"], optional = true }
pin-project = { version = "1", optional = true }
pin-project-lite = { version = "0.2.7", optional = true }
[dev-dependencies]
futures = "0.3"
hdrhistogram = "7.0"
pin-project-lite = "0.2.7"
tokio = { version = "1.6", features = ["macros", "sync", "test-util", "rt-multi-thread"] }
tokio-stream = "0.1"
tokio-test = "0.4"
tower-test = { version = "0.4", path = "../tower-test" }
tracing-subscriber = "0.2.14"
http = "0.2"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[package.metadata.playground]
features = ["full"]
[[example]]
name = "tower-balance"
path = "examples/tower-balance.rs"
required-features = ["full"]