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