Recent versions of Windows support Unix Domain Sockets natively, see https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/.
By using that feature instead of Windows named pipes, the difference for handling communication via the control socket comparing Unix-like systems and Windows becomes smaller:
- No special paths like
\.\pipe\…have to be handled. - Not two I/O mechanisms are abstracted (named pipe and UDS) but just one.
winpiperelies on background threads whileuds_windowsdoes not.
Once the feature windows_unix_domain_sockets (which is tracked at
https://github.com/rust-lang/rust/issues/150487) stabilizes, it will
likely be possible to just drop the dependency uds_windows and use
the implementation in std::os::windows::net directly.
Recent versions of Windows support Unix Domain Sockets natively, see https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/.
By using that feature instead of Windows named pipes, the difference for handling communication via the control socket comparing Unix-like systems and Windows becomes smaller:
- No special paths like
\.\pipe\…have to be handled. - Not two I/O mechanisms are abstracted (named pipe and UDS) but just one.
winpiperelies on background threads whileuds_windowsdoes not.
Once the feature windows_unix_domain_sockets (which is tracked at
https://github.com/rust-lang/rust/issues/150487) stabilizes, it will
likely be possible to just drop the dependency uds_windows and use
the implementation in std::os::windows::net directly.