From 370c6df40ada93b6f5ac69f3ea6d8dc8171de393 Mon Sep 17 00:00:00 2001 From: tottoto Date: Sun, 28 Dec 2025 08:39:32 +0900 Subject: [PATCH] examples: Update to axum-server 0.8 (#3605) --- examples/Cargo.lock | 29 ++++++++-------------- examples/tls-graceful-shutdown/Cargo.toml | 2 +- examples/tls-graceful-shutdown/src/main.rs | 2 +- examples/tls-rustls/Cargo.toml | 2 +- examples/websockets-http2/Cargo.toml | 2 +- 5 files changed, 15 insertions(+), 22 deletions(-) diff --git a/examples/Cargo.lock b/examples/Cargo.lock index bcab4590..c966aad6 100644 --- a/examples/Cargo.lock +++ b/examples/Cargo.lock @@ -359,12 +359,13 @@ dependencies = [ [[package]] name = "axum-server" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "495c05f60d6df0093e8fb6e74aa5846a0ad06abaf96d76166283720bf740f8ab" +checksum = "b1df331683d982a0b9492b38127151e6453639cd34926eb9c07d4cd8c6d22bfc" dependencies = [ "arc-swap", "bytes", + "either", "fs-err", "http", "http-body", @@ -372,7 +373,6 @@ dependencies = [ "hyper-util", "pin-project-lite", "rustls", - "rustls-pemfile", "rustls-pki-types", "tokio", "tokio-rustls", @@ -2354,13 +2354,14 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "1.6.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" dependencies = [ + "atomic-waker", "bytes", "futures-channel", - "futures-util", + "futures-core", "h2", "http", "http-body", @@ -2368,6 +2369,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", + "pin-utils", "smallvec", "tokio", "want", @@ -2408,9 +2410,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.13" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c293b6b3d21eca78250dc7dbebd6b9210ec5530e038cbfe0661b5c47ab06e8" +checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" dependencies = [ "base64 0.22.1", "bytes", @@ -2424,7 +2426,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.5.10", + "socket2 0.6.1", "system-configuration", "tokio", "tower-service", @@ -3922,15 +3924,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "rustls-pemfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "rustls-pki-types" version = "1.12.0" diff --git a/examples/tls-graceful-shutdown/Cargo.toml b/examples/tls-graceful-shutdown/Cargo.toml index 517e5a38..5dcbc859 100644 --- a/examples/tls-graceful-shutdown/Cargo.toml +++ b/examples/tls-graceful-shutdown/Cargo.toml @@ -7,7 +7,7 @@ publish = false [dependencies] axum = { path = "../../axum" } axum-extra = { path = "../../axum-extra" } -axum-server = { version = "0.7", features = ["tls-rustls"] } +axum-server = { version = "0.8", features = ["tls-rustls"] } tokio = { version = "1", features = ["full"] } tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } diff --git a/examples/tls-graceful-shutdown/src/main.rs b/examples/tls-graceful-shutdown/src/main.rs index 9a17520b..37f27443 100644 --- a/examples/tls-graceful-shutdown/src/main.rs +++ b/examples/tls-graceful-shutdown/src/main.rs @@ -69,7 +69,7 @@ async fn main() { .unwrap(); } -async fn shutdown_signal(handle: axum_server::Handle) { +async fn shutdown_signal(handle: axum_server::Handle) { let ctrl_c = async { signal::ctrl_c() .await diff --git a/examples/tls-rustls/Cargo.toml b/examples/tls-rustls/Cargo.toml index c5cd65ad..7d1eefdb 100644 --- a/examples/tls-rustls/Cargo.toml +++ b/examples/tls-rustls/Cargo.toml @@ -7,7 +7,7 @@ publish = false [dependencies] axum = { path = "../../axum" } axum-extra = { path = "../../axum-extra" } -axum-server = { version = "0.7", features = ["tls-rustls"] } +axum-server = { version = "0.8", features = ["tls-rustls"] } tokio = { version = "1", features = ["full"] } tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } diff --git a/examples/websockets-http2/Cargo.toml b/examples/websockets-http2/Cargo.toml index 7c2c0dc2..bcad6eff 100644 --- a/examples/websockets-http2/Cargo.toml +++ b/examples/websockets-http2/Cargo.toml @@ -6,7 +6,7 @@ publish = false [dependencies] axum = { path = "../../axum", features = ["ws", "http2"] } -axum-server = { version = "0.7", features = ["tls-rustls"] } +axum-server = { version = "0.8", features = ["tls-rustls"] } tokio = { version = "1", features = ["full"] } tower-http = { version = "0.6", features = ["fs"] } tracing = "0.1"