Skip to content

Conversation

@seanmonstar
Copy link
Owner

Similar to adding support for Unix Domain Sockets in #2624, this adds support for Windows Named Pipes that functions the same way.

cc @danielsn @morrisonlevi

@seanmonstar seanmonstar force-pushed the windows-named-pipes branch 6 times, most recently from 7fdcc93 to f647929 Compare August 8, 2025 20:08
@danielsn
Copy link

danielsn commented Dec 4, 2025

Looks good to me.

@danielsn
Copy link

danielsn commented Dec 17, 2025

On DataDog/libdatadog#1412

I got an error in CI when I tried to use this. Is this correct? Is there a reason unix accepts a path-buf but windows doesn't?

error[E0277]: the trait bound `std::path::PathBuf: reqwest::connect::windows_named_pipe::WindowsNamedPipeProvider` is not satisfied
    --> libdd-profiling\src\exporter\profile_exporter.rs:89:54
     |
  89 |                 builder = builder.windows_named_pipe(pipe_path);
     |                                   ------------------ ^^^^^^^^^ the trait `reqwest::connect::windows_named_pipe::WindowsNamedPipeProvider` is not implemented for `std::path::PathBuf`
     |                                   |
     |                                   required by a bound introduced by this call
     |
     = help: the following other types implement trait `reqwest::connect::windows_named_pipe::WindowsNamedPipeProvider`:
               &str
               std::string::String
note: required by a bound in `reqwest::ClientBuilder::windows_named_pipe`
    --> C:\Users\runneradmin\.cargo\git\checkouts\reqwest-691f072c9d01bc8f\272b6c9\src\async_impl\client.rs:1814:52
     |
1814 |     pub fn windows_named_pipe(mut self, pipe: impl WindowsNamedPipeProvider) -> ClientBuilder {
     |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClientBuilder::windows_named_pipe`

error[E0277]: the trait bound `std::path::PathBuf: reqwest::connect::windows_named_pipe::WindowsNamedPipeProvider` is not satisfied
    --> libdd-profiling\src\exporter\profile_exporter.rs:111:54
     |
 111 |                 builder = builder.windows_named_pipe(pipe_path);
     |                                   ------------------ ^^^^^^^^^ the trait `reqwest::connect::windows_named_pipe::WindowsNamedPipeProvider` is not implemented for `std::path::PathBuf`
     |                                   |
     |                                   required by a bound introduced by this call
     |
     = help: the following other types implement trait `reqwest::connect::windows_named_pipe::WindowsNamedPipeProvider`:
               &str
               std::string::String
note: required by a bound in `reqwest::ClientBuilder::windows_named_pipe`
    --> C:\Users\runneradmin\.cargo\git\checkouts\reqwest-691f072c9d01bc8f\272b6c9\src\async_impl\client.rs:1814:52
     |
1814 |     pub fn windows_named_pipe(mut self, pipe: impl WindowsNamedPipeProvider) -> ClientBuilder {
     |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ClientBuilder::windows_named_pipe`

@seanmonstar
Copy link
Owner Author

Seems like an oversight. Windows named pipes want an OsStr, but I see there's an AsRef<OsStr> for PathBuf. So I can add in a couple more impls inside reqwest.

@danielsn
Copy link

Looks like this passes when we try to us it DataDog/libdatadog#1412. Thanks!

@seanmonstar seanmonstar enabled auto-merge (squash) December 19, 2025 20:10
@seanmonstar seanmonstar disabled auto-merge December 19, 2025 20:10
@seanmonstar seanmonstar merged commit 4967b1b into master Dec 19, 2025
37 checks passed
@seanmonstar seanmonstar deleted the windows-named-pipes branch December 19, 2025 20:10
kodiakhq bot pushed a commit to pdylanross/fatigue that referenced this pull request Dec 23, 2025
Bumps reqwest from 0.12.26 to 0.12.28.

Release notes
Sourced from reqwest's releases.

v0.12.27
tl;dr

Add ClientBuilder::windows_named_pipe(name) option that will force all requests over that Windows Named Pipe.

What's Changed

chore: Disable unused tokio-util codec feature by @​tottoto in seanmonstar/reqwest#2893
chore: Use http_body_util::BodyDataStream by @​tottoto in seanmonstar/reqwest#2892
feat: add windows_named_pipe() option to client builder by @​seanmonstar in seanmonstar/reqwest#2789

Full Changelog: seanmonstar/reqwest@v0.12.26...v0.12.27



Changelog
Sourced from reqwest's changelog.

v0.12.28

Fix compiling on Windows if TLS and SOCKS features are not enabled.

v0.12.27

Add ClientBuilder::windows_named_pipe(name) option that will force all requests over that Windows Named Piper.




Commits

d978599 v0.12.28
ef2768a fix: correctly import TokioIo on Windows (#2896)
1bf6441 v0.12.27
4967b1b feat: add windows_named_pipe() option to client builder (#2789)
ef5b239 chore: Use http_body_util::BodyDataStream (#2892)
a810004 chore: Disable unused tokio-util codec feature (#2893)
See full diff in compare view




Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

@dependabot rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot merge will merge this PR after your CI passes on it
@dependabot squash and merge will squash and merge this PR after your CI passes on it
@dependabot cancel merge will cancel a previously requested merge and block automerging
@dependabot reopen will reopen this PR if it is closed
@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
@dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
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.

3 participants