Repository navigation
Conversation
|
Thanks for the pull request, and welcome! The Rust Project has assigned @Mark-Simulacrum (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Please see the contribution instructions and our LLM policy for more information. Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
☔ The latest upstream changes (presumably #165056) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
|
@rfcbot merge libs |
|
@ChrisDenton has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/libs-ping: FCP proposed for libs, please feel free to register concerns. |
Stabilization Report
Closes #150487
Implementation History
Unix domain socket support (UDS) on Windows was added in #150428.
API Summary
A summary of the API is included at the top of this tracking issue.
Unix vs Windows diff
std::os::unix::netstd::os::windows::netUnixStream,UnixListener,SocketAddr,IncomingAsFd/AsRawFd(OwnedFd,RawFd)AsSocket/AsRawSocket(OwnedSocket,RawSocket)UnixDatagramSocketAddrfrom abstract namespaceSCM_RIGHTSfd passingpair()The core APIs for UDS (UnixStream, UnixListener, etc) are largely the same across Unix and Windows when using socket paths.
Windows does not support abstract paths in AF_UNIX, and as such UDS on Windows would not support creating a SocketAddr from an abstract path.
Due to this divergence, I recommend that we maintain the current structure with two separate implementations in OS specific locations (std::os::unix::net and std::os::windows::net).
Out of scope for this stabilization is presenting a unified interface if one exists.
Experience Report
The uds_windows crate which provides similar functionality has 55 million downloads, showing demand for this feature in std.
Additionally, uds_windows only provides a synchronous interface. Once std aligns on the interface, mio and tokio intend to mirror it to provide an async interface.
Mark-Simulacrum already reported our experience using this nightly API at $WORK.
To provide some additional detail, we have a shared crate that provides a shared interface across Windows and Unix via cfg gating on the OS. We verified that UDS created using a socket path works on both Unix and Windows.
#150487 (comment)
I think we have sufficient evidence that we can stabilize this feature as is.
I wrote the PR description entirely by hand, while copying format and some language from example stabilization reports (#88581 (comment), #163696) as this is my first stabilization report.
LLM usage disclosure: I used an LLM which pulled function headers for Unix and Windows variants of Unix Domain socket and generated the first draft of the diff chart.