| 1 | [package] |
| 2 | name = "hyper" |
| 3 | version = "1.6.0" |
| 4 | description = "A protective and efficient HTTP library for all." |
| 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 = "2021" |
| 14 | rust-version = "1.63" # keep in sync with MSRV.md dev doc |
| 15 | |
| 16 | include = [ |
| 17 | "Cargo.toml" , |
| 18 | "LICENSE" , |
| 19 | "src/**/*" , |
| 20 | ] |
| 21 | |
| 22 | [dependencies] |
| 23 | bytes = "1.2" |
| 24 | http = "1" |
| 25 | http-body = "1" |
| 26 | tokio = { version = "1" , features = ["sync" ] } |
| 27 | |
| 28 | # Optional |
| 29 | |
| 30 | futures-channel = { version = "0.3" , optional = true } |
| 31 | futures-util = { version = "0.3" , default-features = false, optional = true } |
| 32 | h2 = { version = "0.4.2" , optional = true } |
| 33 | http-body-util = { version = "0.1" , optional = true } |
| 34 | httparse = { version = "1.9" , optional = true } |
| 35 | httpdate = { version = "1.0" , optional = true } |
| 36 | itoa = { version = "1" , optional = true } |
| 37 | pin-project-lite = { version = "0.2.4" , optional = true } |
| 38 | smallvec = { version = "1.12" , features = ["const_generics" , "const_new" ], optional = true } |
| 39 | tracing = { version = "0.1" , default-features = false, features = ["std" ], optional = true } |
| 40 | want = { version = "0.3" , optional = true } |
| 41 | |
| 42 | [dev-dependencies] |
| 43 | form_urlencoded = "1" |
| 44 | futures-channel = { version = "0.3" , features = ["sink" ] } |
| 45 | futures-util = { version = "0.3" , default-features = false, features = ["alloc" , "sink" ] } |
| 46 | http-body-util = "0.1" |
| 47 | pretty_env_logger = "0.5" |
| 48 | pin-project-lite = "0.2.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 | "net" , |
| 56 | "io-std" , |
| 57 | "io-util" , |
| 58 | "rt" , |
| 59 | "rt-multi-thread" , # so examples can use #[tokio::main] |
| 60 | "sync" , |
| 61 | "time" , |
| 62 | "test-util" , |
| 63 | ] } |
| 64 | tokio-test = "0.4" |
| 65 | tokio-util = "0.7.10" |
| 66 | |
| 67 | [features] |
| 68 | # Nothing by default |
| 69 | default = [] |
| 70 | |
| 71 | # Easily turn it all on |
| 72 | full = [ |
| 73 | "client" , |
| 74 | "http1" , |
| 75 | "http2" , |
| 76 | "server" , |
| 77 | ] |
| 78 | |
| 79 | # HTTP versions |
| 80 | http1 = ["dep:futures-channel" , "dep:futures-util" , "dep:httparse" , "dep:itoa" ] |
| 81 | http2 = ["dep:futures-channel" , "dep:futures-util" , "dep:h2" ] |
| 82 | |
| 83 | # Client/Server |
| 84 | client = ["dep:want" , "dep:pin-project-lite" , "dep:smallvec" ] |
| 85 | server = ["dep:httpdate" , "dep:pin-project-lite" , "dep:smallvec" ] |
| 86 | |
| 87 | # C-API support (currently unstable (no semver)) |
| 88 | ffi = ["dep:http-body-util" , "futures-util?/alloc" ] |
| 89 | capi = [] |
| 90 | |
| 91 | # Utilize tracing (currently unstable) |
| 92 | tracing = ["dep:tracing" ] |
| 93 | |
| 94 | # internal features used in CI |
| 95 | nightly = [] |
| 96 | |
| 97 | [lints.rust.unexpected_cfgs] |
| 98 | level = "warn" |
| 99 | check-cfg = [ |
| 100 | 'cfg(hyper_unstable_tracing)' , |
| 101 | 'cfg(hyper_unstable_ffi)' |
| 102 | ] |
| 103 | |
| 104 | [package.metadata.docs.rs] |
| 105 | features = ["ffi" , "full" , "tracing" ] |
| 106 | rustdoc-args = ["--cfg" , "hyper_unstable_ffi" , "--cfg" , "hyper_unstable_tracing" ] |
| 107 | |
| 108 | [package.metadata.playground] |
| 109 | features = ["full" ] |
| 110 | |
| 111 | [package.metadata.capi.header] |
| 112 | generation = false |
| 113 | subdirectory = false |
| 114 | |
| 115 | [package.metadata.capi.install.include] |
| 116 | asset = [{ from="capi/include/hyper.h" }] |
| 117 | |
| 118 | [profile.release] |
| 119 | codegen-units = 1 |
| 120 | incremental = false |
| 121 | |
| 122 | [profile.bench] |
| 123 | codegen-units = 1 |
| 124 | incremental = false |
| 125 | |
| 126 | [[example]] |
| 127 | name = "client" |
| 128 | path = "examples/client.rs" |
| 129 | required-features = ["full" ] |
| 130 | |
| 131 | [[example]] |
| 132 | name = "client_json" |
| 133 | path = "examples/client_json.rs" |
| 134 | required-features = ["full" ] |
| 135 | |
| 136 | [[example]] |
| 137 | name = "echo" |
| 138 | path = "examples/echo.rs" |
| 139 | required-features = ["full" ] |
| 140 | |
| 141 | [[example]] |
| 142 | name = "gateway" |
| 143 | path = "examples/gateway.rs" |
| 144 | required-features = ["full" ] |
| 145 | |
| 146 | [[example]] |
| 147 | name = "graceful_shutdown" |
| 148 | path = "examples/graceful_shutdown.rs" |
| 149 | required-features = ["full" ] |
| 150 | |
| 151 | [[example]] |
| 152 | name = "hello" |
| 153 | path = "examples/hello.rs" |
| 154 | required-features = ["full" ] |
| 155 | |
| 156 | [[example]] |
| 157 | name = "http_proxy" |
| 158 | path = "examples/http_proxy.rs" |
| 159 | required-features = ["full" ] |
| 160 | |
| 161 | [[example]] |
| 162 | name = "multi_server" |
| 163 | path = "examples/multi_server.rs" |
| 164 | required-features = ["full" ] |
| 165 | |
| 166 | [[example]] |
| 167 | name = "params" |
| 168 | path = "examples/params.rs" |
| 169 | required-features = ["full" ] |
| 170 | |
| 171 | [[example]] |
| 172 | name = "send_file" |
| 173 | path = "examples/send_file.rs" |
| 174 | required-features = ["full" ] |
| 175 | |
| 176 | [[example]] |
| 177 | name = "service_struct_impl" |
| 178 | path = "examples/service_struct_impl.rs" |
| 179 | required-features = ["full" ] |
| 180 | |
| 181 | [[example]] |
| 182 | name = "single_threaded" |
| 183 | path = "examples/single_threaded.rs" |
| 184 | required-features = ["full" ] |
| 185 | |
| 186 | [[example]] |
| 187 | name = "state" |
| 188 | path = "examples/state.rs" |
| 189 | required-features = ["full" ] |
| 190 | |
| 191 | [[example]] |
| 192 | name = "upgrades" |
| 193 | path = "examples/upgrades.rs" |
| 194 | required-features = ["full" ] |
| 195 | |
| 196 | |
| 197 | [[example]] |
| 198 | name = "web_api" |
| 199 | path = "examples/web_api.rs" |
| 200 | required-features = ["full" ] |
| 201 | |
| 202 | |
| 203 | [[bench]] |
| 204 | name = "body" |
| 205 | path = "benches/body.rs" |
| 206 | required-features = ["full" ] |
| 207 | |
| 208 | [[bench]] |
| 209 | name = "connect" |
| 210 | path = "benches/connect.rs" |
| 211 | required-features = ["full" ] |
| 212 | |
| 213 | [[bench]] |
| 214 | name = "end_to_end" |
| 215 | path = "benches/end_to_end.rs" |
| 216 | required-features = ["full" ] |
| 217 | |
| 218 | [[bench]] |
| 219 | name = "pipeline" |
| 220 | path = "benches/pipeline.rs" |
| 221 | required-features = ["full" ] |
| 222 | |
| 223 | [[bench]] |
| 224 | name = "server" |
| 225 | path = "benches/server.rs" |
| 226 | required-features = ["full" ] |
| 227 | |
| 228 | |
| 229 | [[test]] |
| 230 | name = "client" |
| 231 | path = "tests/client.rs" |
| 232 | required-features = ["full" ] |
| 233 | |
| 234 | [[test]] |
| 235 | name = "integration" |
| 236 | path = "tests/integration.rs" |
| 237 | required-features = ["full" ] |
| 238 | |
| 239 | [[test]] |
| 240 | name = "server" |
| 241 | path = "tests/server.rs" |
| 242 | required-features = ["full" ] |
| 243 | |