Skip to content

Conversation

@kouhe3
Copy link
Contributor

@kouhe3 kouhe3 commented Dec 27, 2025

Hi, I re impl this. Hope you test it.

@rustbot
Copy link
Collaborator

rustbot commented Dec 27, 2025

r? @jhpratt

rustbot has assigned @jhpratt.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 27, 2025
@rust-log-analyzer

This comment has been minimized.

@jhpratt
Copy link
Member

jhpratt commented Dec 29, 2025

r? libs

@rustbot
Copy link
Collaborator

rustbot commented Dec 29, 2025

No reviewers could be found from initial request libs
This repo may be misconfigured.
Use r? to specify someone else to assign.

@kouhe3
Copy link
Contributor Author

kouhe3 commented Dec 29, 2025

@dtolnay Could you check this pr too?

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 29, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 29, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@kouhe3
Copy link
Contributor Author

kouhe3 commented Dec 29, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 29, 2025
@jhpratt
Copy link
Member

jhpratt commented Jan 4, 2026

Let's try to re-roll again

r? libs

@rustbot rustbot assigned tgross35 and unassigned jhpratt Jan 4, 2026
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also keep commits squashed as you go.

View changes since this review

use crate::{fmt, io, mem};

#[cfg(not(doc))]
pub fn sockaddr_un(path: &Path) -> io::Result<(SOCKADDR_UN, usize)> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/, it looks to me like abstract and unnamed sockets should both be supported by Windows as well. Presumably the implementation should as such more closely mirror library/std/src/os/unix/net/addr.rs?

That would also fix the problem in fmt::Debug, where you bail if it's not a path socket incorrectly; it would make more sense for me if it used the same strategy as the unix impl.

Copy link
Contributor Author

@kouhe3 kouhe3 Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe abstract sockets not support by Windows. Set first byte of sun_path to zero cause code: 10022 when connect

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an unresolved question to the tracking issue about that? It doesn't seem expected to me given:

The second category is the ‘abstract’ socket address where the first character in ‘sun_path’ is a null byte. Windows implementation of AF_UNIX socket can also accept abstract addresses. The one difference noteworthy here is that the Windows unix socket implementation currently does not support the autobind feature whereby an abstract address is auto-generated by the implementation on behalf of the user.

Maybe something is wrong with our setup or the blog post is stale...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mark-Simulacrum seems like microsoft not impl full AF_UNIX yet. I will add this ref to tracking issue.

I suggest specifying in the documentation that only AF_UNIX SOCK_STREAM with TRUE paths is supported

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 4, 2026
@kouhe3
Copy link
Contributor Author

kouhe3 commented Jan 5, 2026

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 5, 2026
@Mark-Simulacrum
Copy link
Member

r=me with commits squashed.

@rustbot

This comment has been minimized.

@Mark-Simulacrum
Copy link
Member

@bors try jobs=aarch64-msvc-1

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Jan 30, 2026
UnixStream/UnixListener on Windows 


try-job: aarch64-msvc-1
@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 30, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 30, 2026

💔 Test for 02b5504 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

This commit introduces initial, unstable support for Unix domain sockets
(UDS) on Windows, behind the `windows_unix_domain_sockets` feature gate

Added types:
- `std::os::windows::net::SocketAddr`: represents a UDS address with support
  for pathname addresses (abstract and unnamed are parsed but not yet fully
  supported).
- `std::os::windows::net::UnixListener`: server-side UDS listener.
- `std::os::windows::net::UnixStream`: client/server stream for UDS.

Key features:
- Binding and connecting using filesystem paths.
- Basic I/O via `Read`/`Write`.
- Address querying (`local_addr`, `peer_addr`).
- Non-blocking mode, timeouts, and socket duplication.
- Includes basic test coverage for smoke, echo, path length, and bind reuse.
@Mark-Simulacrum
Copy link
Member

@bors try jobs=aarch64-msvc-1

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 1, 2026
UnixStream/UnixListener on Windows 


try-job: aarch64-msvc-1
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 1, 2026

☀️ Try build successful (CI)
Build commit: fbce14e (fbce14e62de5f13b8ad5c35ef84234dc05c2792f, parent: b7fb22086524eca64ad2b0ef778a480e6c7a8b7f)

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup=iffy

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 1, 2026

📌 Commit 1689fcd has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 1, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 1, 2026
…acrum

UnixStream/UnixListener on Windows

Hi, I re impl this. Hope you test it.
rust-bors bot pushed a commit that referenced this pull request Feb 1, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - #150428 (UnixStream/UnixListener on Windows )
 - #147400 (TryFrom<integer> for bool)
 - #150993 (std: sys: uefi: os: Implement join_paths)
 - #151483 (Add regression test for issue #138225)
 - #151568 (Update hexagon target linker configurations)
 - #151725 (Fix outdated Debian Ports ISO reference)
 - #151895 (Move UI tests batch)
 - #151923 (Fix ICE when projection error reporting sees opaque alias terms)
 - #151947 (Include assoc const projections in CFI trait object)
 - #151948 (Handle unbalanced delimiters gracefully in make_attr_token_stream)
@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 2, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 2, 2026

☀️ Test successful - CI
Approved by: Mark-Simulacrum
Duration: 3h 7m 30s
Pushing 92ea9b2 to main...

@rust-bors rust-bors bot merged commit 92ea9b2 into rust-lang:main Feb 2, 2026
13 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 57d2fb1 (parent) -> 92ea9b2 (this PR)

Test differences

Show 37 test diffs

Stage 2

  • win_uds_echo: [missing] -> pass (J0)
  • win_uds_existing_bind: [missing] -> pass (J0)
  • win_uds_path_too_long: [missing] -> pass (J0)
  • win_uds_smoke_bind_connect: [missing] -> pass (J0)

Additionally, 33 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 92ea9b29d1d0d124df37e3392bbbe9898ca7dd96 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-apple-various: 3692.9s -> 3068.8s (-16.9%)
  2. i686-gnu-2: 6297.8s -> 5374.5s (-14.7%)
  3. pr-check-1: 1928.9s -> 1657.5s (-14.1%)
  4. dist-aarch64-apple: 7882.0s -> 6827.8s (-13.4%)
  5. dist-x86_64-apple: 7846.2s -> 6812.6s (-13.2%)
  6. aarch64-apple: 10717.6s -> 9351.5s (-12.7%)
  7. dist-aarch64-msvc: 7180.5s -> 6316.8s (-12.0%)
  8. aarch64-gnu-llvm-20-1: 3920.0s -> 3478.1s (-11.3%)
  9. dist-various-2: 2337.7s -> 2591.9s (+10.9%)
  10. dist-aarch64-llvm-mingw: 6393.4s -> 5708.3s (-10.7%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (92ea9b2): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary 3.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.2% [3.2%, 3.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (primary 7.7%, secondary -4.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
7.7% [7.5%, 8.0%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.3% [-5.4%, -3.3%] 2
All ❌✅ (primary) 7.7% [7.5%, 8.0%] 2

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 473.934s -> 470.853s (-0.65%)
Artifact size: 397.68 MiB -> 397.67 MiB (-0.00%)

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

Labels

merged-by-bors This PR was explicitly merged by bors. O-windows Operating system: Windows T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants