1 | [package] |
2 | name = "hyper" |
3 | version = "0.14.28" |
4 | description = "A fast and correct HTTP library." |
5 | readme = "README.md" |
6 | homepage = "https://hyper.rs" |
7 | documentation = "https://docs.rs/hyper" |
8 | repository = "https://github.com/hyperium/hyper" |
9 | license = "MIT" |
10 | authors = ["Sean McArthur <sean@seanmonstar.com>" ] |
11 | keywords = ["http" , "hyper" , "hyperium" ] |
12 | categories = ["network-programming" , "web-programming::http-client" , "web-programming::http-server" ] |
13 | edition = "2018" |
14 | |
15 | include = [ |
16 | "Cargo.toml" , |
17 | "LICENSE" , |
18 | "src/**/*" , |
19 | #"build.rs", |
20 | ] |
21 | |
22 | [dependencies] |
23 | bytes = "1" |
24 | futures-core = { version = "0.3" , default-features = false } |
25 | futures-channel = "0.3" |
26 | futures-util = { version = "0.3" , default-features = false } |
27 | http = "0.2" |
28 | http-body = "0.4" |
29 | httpdate = "1.0" |
30 | httparse = "1.8" |
31 | h2 = { version = "0.3.17" , optional = true } |
32 | itoa = "1" |
33 | tracing = { version = "0.1" , default-features = false, features = ["std" ] } |
34 | pin-project-lite = "0.2.4" |
35 | tower-service = "0.3" |
36 | tokio = { version = "1" , features = ["sync" ] } |
37 | want = "0.3" |
38 | |
39 | # Optional |
40 | |
41 | libc = { version = "0.2" , optional = true } |
42 | socket2 = { version = ">=0.4.7, <0.6.0" , optional = true, features = ["all" ] } |
43 | |
44 | [dev-dependencies] |
45 | futures-util = { version = "0.3" , default-features = false, features = ["alloc" ] } |
46 | matches = "0.1" |
47 | num_cpus = "1.0" |
48 | pretty_env_logger = "0.4" |
49 | spmc = "0.3" |
50 | serde = { version = "1.0" , features = ["derive" ] } |
51 | serde_json = "1.0" |
52 | tokio = { version = "1" , features = [ |
53 | "fs" , |
54 | "macros" , |
55 | "io-std" , |
56 | "io-util" , |
57 | "rt" , |
58 | "rt-multi-thread" , # so examples can use #[tokio::main] |
59 | "sync" , |
60 | "time" , |
61 | "test-util" , |
62 | ] } |
63 | tokio-test = "0.4" |
64 | tokio-util = { version = "0.7" , features = ["codec" ] } |
65 | tower = { version = "0.4" , default-features = false, features = ["make" , "util" ] } |
66 | url = "2.2" |
67 | |
68 | [target.'cfg(any(target_os = "linux", target_os = "macos"))'.dev-dependencies] |
69 | pnet_datalink = "0.27.2" |
70 | |
71 | [features] |
72 | # Nothing by default |
73 | default = [] |
74 | |
75 | # Easily turn it all on |
76 | full = [ |
77 | "client" , |
78 | "http1" , |
79 | "http2" , |
80 | "server" , |
81 | "stream" , |
82 | "runtime" , |
83 | ] |
84 | |
85 | # HTTP versions |
86 | http1 = [] |
87 | http2 = ["h2" ] |
88 | |
89 | # Client/Server |
90 | client = [] |
91 | server = [] |
92 | |
93 | # `impl Stream` for things |
94 | stream = [] |
95 | |
96 | # Tokio support |
97 | runtime = [ |
98 | "tcp" , |
99 | "tokio/rt" , |
100 | "tokio/time" , |
101 | ] |
102 | tcp = [ |
103 | "socket2" , |
104 | "tokio/net" , |
105 | "tokio/rt" , |
106 | "tokio/time" , |
107 | ] |
108 | |
109 | # C-API support (currently unstable (no semver)) |
110 | ffi = ["libc" ] |
111 | |
112 | # enable 1.0 backports |
113 | backports = [] |
114 | |
115 | # whether or not to display deprecation warnings |
116 | deprecated = [] |
117 | |
118 | # internal features used in CI |
119 | nightly = [] |
120 | __internal_happy_eyeballs_tests = [] |
121 | |
122 | [package.metadata.docs.rs] |
123 | features = ["ffi" , "full" ] |
124 | rustdoc-args = ["--cfg" , "docsrs" , "--cfg" , "hyper_unstable_ffi" ] |
125 | |
126 | [package.metadata.playground] |
127 | features = ["full" ] |
128 | |
129 | [profile.release] |
130 | codegen-units = 1 |
131 | incremental = false |
132 | |
133 | [profile.bench] |
134 | codegen-units = 1 |
135 | incremental = false |
136 | |
137 | [[example]] |
138 | name = "client" |
139 | path = "examples/client.rs" |
140 | required-features = ["full" ] |
141 | |
142 | [[example]] |
143 | name = "client_json" |
144 | path = "examples/client_json.rs" |
145 | required-features = ["full" ] |
146 | |
147 | [[example]] |
148 | name = "echo" |
149 | path = "examples/echo.rs" |
150 | required-features = ["full" ] |
151 | |
152 | [[example]] |
153 | name = "gateway" |
154 | path = "examples/gateway.rs" |
155 | required-features = ["full" ] |
156 | |
157 | [[example]] |
158 | name = "hello" |
159 | path = "examples/hello.rs" |
160 | required-features = ["full" ] |
161 | |
162 | [[example]] |
163 | name = "http_proxy" |
164 | path = "examples/http_proxy.rs" |
165 | required-features = ["full" ] |
166 | |
167 | [[example]] |
168 | name = "multi_server" |
169 | path = "examples/multi_server.rs" |
170 | required-features = ["full" ] |
171 | |
172 | [[example]] |
173 | name = "params" |
174 | path = "examples/params.rs" |
175 | required-features = ["full" ] |
176 | |
177 | [[example]] |
178 | name = "send_file" |
179 | path = "examples/send_file.rs" |
180 | required-features = ["full" ] |
181 | |
182 | [[example]] |
183 | name = "service_struct_impl" |
184 | path = "examples/service_struct_impl.rs" |
185 | required-features = ["full" ] |
186 | |
187 | [[example]] |
188 | name = "single_threaded" |
189 | path = "examples/single_threaded.rs" |
190 | required-features = ["full" ] |
191 | |
192 | [[example]] |
193 | name = "state" |
194 | path = "examples/state.rs" |
195 | required-features = ["full" ] |
196 | |
197 | [[example]] |
198 | name = "tower_client" |
199 | path = "examples/tower_client.rs" |
200 | required-features = ["full" , "backports" ] |
201 | |
202 | [[example]] |
203 | name = "tower_server" |
204 | path = "examples/tower_server.rs" |
205 | required-features = ["full" ] |
206 | |
207 | [[example]] |
208 | name = "upgrades" |
209 | path = "examples/upgrades.rs" |
210 | required-features = ["full" ] |
211 | |
212 | |
213 | [[example]] |
214 | name = "web_api" |
215 | path = "examples/web_api.rs" |
216 | required-features = ["full" ] |
217 | |
218 | |
219 | [[bench]] |
220 | name = "body" |
221 | path = "benches/body.rs" |
222 | required-features = ["full" ] |
223 | |
224 | [[bench]] |
225 | name = "connect" |
226 | path = "benches/connect.rs" |
227 | required-features = ["full" ] |
228 | |
229 | [[bench]] |
230 | name = "end_to_end" |
231 | path = "benches/end_to_end.rs" |
232 | required-features = ["full" ] |
233 | |
234 | [[bench]] |
235 | name = "pipeline" |
236 | path = "benches/pipeline.rs" |
237 | required-features = ["full" ] |
238 | |
239 | [[bench]] |
240 | name = "server" |
241 | path = "benches/server.rs" |
242 | required-features = ["full" ] |
243 | |
244 | |
245 | [[test]] |
246 | name = "client" |
247 | path = "tests/client.rs" |
248 | required-features = ["full" ] |
249 | |
250 | [[test]] |
251 | name = "integration" |
252 | path = "tests/integration.rs" |
253 | required-features = ["full" ] |
254 | |
255 | [[test]] |
256 | name = "server" |
257 | path = "tests/server.rs" |
258 | required-features = ["full" ] |
259 | |