Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ tokio = { version = "1", features = [
] }
tokio-test = "0.4"
tokio-util = "0.7.10"
# Additional dependencies for HTTP/2 Early Hints example
rcgen = "0.12"
tokio-rustls = "0.25"
rustls-pemfile = "2.0"

[features]
# Nothing by default
Expand All @@ -85,7 +89,7 @@ http2 = ["dep:futures-channel", "dep:futures-core", "dep:h2"]

# Client/Server
client = ["dep:want", "dep:pin-project-lite", "dep:smallvec"]
server = ["dep:httpdate", "dep:pin-project-lite", "dep:smallvec"]
server = ["dep:httpdate", "dep:pin-project-lite", "dep:smallvec", "dep:futures-util"]

# C-API support (currently unstable (no semver))
ffi = ["dep:http-body-util", "dep:futures-util"]
Expand Down Expand Up @@ -202,6 +206,11 @@ name = "web_api"
path = "examples/web_api.rs"
required-features = ["full"]

[[example]]
name = "http2_early_hints"
path = "examples/http2_early_hints.rs"
required-features = ["full"]


[[bench]]
name = "body"
Expand Down
2 changes: 2 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ futures-util = { version = "0.3", default-features = false }

* [`echo`](echo.rs) - An echo server that copies POST request's content to the response content.

* [`http2_early_hints`](http2_early_hints.rs) - An HTTP/2 server that sends 103 Early Hints.

## Going Further

* [`gateway`](gateway.rs) - A server gateway (reverse proxy) that proxies to the `hello` service above.
Expand Down
Loading