Skip to content

Support pathname Unix-domain streams on Windows #795

Description

@LunaStev

Motivation

The Windows local-address provider always returns -95, and the Windows branches of _unix_socket and unix_remove do the same. Consequently, portable applications using std::net::unix cannot use pathname local stream sockets on Windows amd64 or ARM64.

This is an intentional missing capability in the current source, not a reproduced regression. Microsoft exposes AF_UNIX for Win32 interprocess communication. A focused provider would let applications use the existing stream API for local IPC without substituting a network listener.

Source audit at 4c3372157d8889fa8bbef0a7ccd2e72aab1c5c6c: std/sys/windows/local_addr.wave, std/sys/local_addr.wave, std/net/unix.wave, std/sys/windows/socket.wave.

Scope

After agreeing on the Windows contract, support pathname AF_UNIX/SOCK_STREAM through Winsock and the existing UnixListener/UnixStream operations. Define address encoding, path limits, filesystem entry cleanup and behavior on Windows versions without the capability. Preserve native errors and close resources on failed bind/connect/listen.

Named pipes, Linux abstract addresses, descriptor passing and local datagrams are separate capabilities. Keep unsupported operations explicit, and preserve Linux/macOS/FreeBSD behavior. No libc adapter is required. Related Windows provider tracker: #385.

Difficulty: hard.

Completion criteria

  • Native Windows amd64/ARM64 tests bind, connect, accept, exchange bytes, shut down and close pathname streams.
  • Test missing/occupied paths, path-length boundaries, agreed non-ASCII path behavior and cleanup after failure.
  • Unsupported Windows versions and unsupported local-address modes return the agreed observable error.
  • Existing Unix platforms and ordinary Winsock TCP/UDP providers retain their behavior.

Design decision needed: Confirm the minimum Windows version, pathname encoding/limits, cleanup ownership and unsupported-capability behavior before implementing the provider.

Please mention @LunaStev to discuss the design before starting implementation.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    cross-platformIssues related to making Wave work seamlessly across multiple operating systems.discussionIssues that require a technical or community discussion.enhancementA request for a new feature or improvement.help wantedThe issue requires extra attention or help from others.os supportA request to add support for a new operating system.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions