Skip to content

feat(client): decouple tokio/net and mio from client-legacy - #338

Open
Aditya-9-6 wants to merge 1 commit into
hyperium:masterfrom
Aditya-9-6:client-legacy-loosen-mio
Open

Aditya-9-6 wants to merge 1 commit into
hyperium:masterfrom
Aditya-9-6:client-legacy-loosen-mio

Conversation

@Aditya-9-6

@Aditya-9-6 Aditya-9-6 commented Oct 4, 2026 •

Copy link
Copy Markdown

Previously, client-legacy unconditionally enabled tokio/net, socket2, and libc, which forced the mio dependency even on platforms that do not support it (such as Fuchsia and WASM), and for downstream libraries (like hyper-rustls) that provide custom connectors without requiring TCP networking.

This change:

  • Re-introduces the tcp feature ([tokio, tokio/net, dep:socket2, dep:libc]) matching hyper 0.14 convention.
  • Decouples tokio/net, socket2, and libc from client-legacy.
  • Gates HttpConnector, dns, and build_http behind #[cfg(feature = tcp)].
  • Adds tcp to the full feature shorthand.
  • Adds an integration test ensuring client-legacy works with a custom connector without requiring the tcp feature.

Closes hyperium/hyper#3842

Previously, client-legacy unconditionally enabled tokio/net, socket2, and libc, which forced the mio dependency even on platforms that do not support it (such as Fuchsia and WASM), and for downstream libraries (like hyper-rustls) that provide custom connectors without requiring TCP networking.

This change:
- Re-introduces the tcp feature ([tokio, tokio/net, dep:socket2, dep:libc]) matching hyper 0.14 convention.
- Decouples tokio/net, socket2, and libc from client-legacy.
- Gates HttpConnector, dns, and build_http behind #[cfg(feature = tcp)].
- Adds tcp to the full feature shorthand.
- Adds an integration test ensuring client-legacy works with a custom connector without requiring the tcp feature.

Closes hyperium/hyper#3842

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hyper-util's "client-legacy" feature forces use of mio, but wasn't required in hyper 0.14.x

1 participant