From cb079f360b1e2d9a9e8e87db17f4f9cdb99a667f Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Sun, 15 Feb 2026 20:21:41 +0000 Subject: [PATCH] Remove `tokio/net` feature from `client` feature Before this patch, `hyper-util`'s feature `client` depended on tokio's feature `net`, which in turn depends on `mio`. That causes `hyper-util` to fail to compile on platforms like Fuchsia, which don't support `mio`. So this patch instead moves the `tokio/net` dependency into the `tokio` feature to avoid this issue. Unfortunately though I think this is a breaking change, since now users might need to add the `tokio` feature. So either we could: 1. Bump the major version. 2. We could add some new features that we could use that parallel `client` and `client-legacy`. For example, `client-without-tokio` and `client-legacy-without-tokio`, and replace all the instances of `feature = "clienty"` feature checks with `any(feature = "client", feature = "client-legacy-without-tokio")`. --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f1a8cd7b..673edbab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,7 +74,7 @@ full = [ "tracing", ] -client = ["hyper/client", "tokio/net", "dep:tracing", "dep:futures-channel", "dep:tower-service"] +client = ["hyper/client", "dep:tracing", "dep:futures-channel", "dep:tower-service"] client-legacy = ["client", "dep:socket2", "tokio/sync", "dep:libc", "dep:futures-util"] client-pool = ["client", "dep:futures-util", "dep:tower-layer"] client-proxy = ["client", "dep:base64", "dep:ipnet", "dep:percent-encoding"] @@ -89,7 +89,7 @@ service = ["dep:tower-service"] http1 = ["hyper/http1"] http2 = ["hyper/http2"] -tokio = ["dep:tokio", "tokio/rt", "tokio/time"] +tokio = ["dep:tokio", "tokio/net", "tokio/rt", "tokio/time"] tracing = ["dep:tracing"]