Design portable fetch transport API - #693
Draft
martin-kolinek wants to merge 5 commits into
Draft
Conversation
Design a transport-erased HttpClientBuilder around portable library requirements, move backend mechanisms out of the public surface, and document named client credentials and TLS endpoint identity mapping. Add executable WinHTTP probes for independent routing/TLS/authority control and Nagle behavior to ground the design in measured backend capabilities. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0c1d47b6-8039-4748-972d-20b238499d82
martin-kolinek
commented
Aug 25, 2026
Require every supported transport to implement the complete portable baseline, add typed pre-build extensions for deliberate backend coupling, and make unsupported certificate policies explicit portable non-goals. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0c1d47b6-8039-4748-972d-20b238499d82
martintmk
reviewed
Aug 26, 2026
| ```rust,ignore | ||
| pub trait Transport: Send + Sync + 'static { | ||
| fn build( | ||
| self: Box<Self>, |
Member
There was a problem hiding this comment.
Suggested change
| self: Box<Self>, | |
| &self, |
why not like this? The transport should still stay boxeable
martintmk
reviewed
Aug 26, 2026
| pub fn configure(builder: HttpClientBuilder) -> Result<HttpClient> { | ||
| builder | ||
| .connection_lifetime(LIFETIME) | ||
| .client_certificate(ClientCredentialId::new("service-client")) |
Member
There was a problem hiding this comment.
imho, all tls specific configuration should have tls_ prefix to keep clean (reqwest did the same)
Define fetch_hyper as a reusable TLS-neutral HTTP engine and move rustls/native-tls connector construction into dependency-isolated composition crates. Limit fetch stabilization to portable requirements and the typed config registry. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0c1d47b6-8039-4748-972d-20b238499d82
Rename the proposed TLS-neutral engine to fetch_hyper_common and retain fetch_hyper only when referring to the current crate being split into common and TLS composition crates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0c1d47b6-8039-4748-972d-20b238499d82
Give portable HTTP/1.1 and HTTP/2 requirements precedence over WinHTTP's HTTP/3 preference, place response decompression in fetch, and define fallible trailer semantics. Add a direct WinHTTP probe demonstrating known- and unknown-length full-duplex HTTP/2 streaming and revise the implementation design around independent send and receive lanes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0c1d47b6-8039-4748-972d-20b238499d82
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Defines the proposed stable API boundary for
fetchbefore implementation work begins.Summary
HttpClientBuilderaround portable library requirementsfetch_hyper_commonas a reusable TLS-neutral HTTP enginefetch_hyper_rustlsandfetch_hyper_native_tlscratesBackend evidence
:authorityTCP_NODELAYcontrolTuning policy
TCP_NODELAY