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