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