UnixStream on Windows?

Yes, that's true, we would certainly have to continue to export it from std::os::unix as well.

Exporting it from std::os::windows would be unfortunate because calling code would have to use #[cfg(windows)] and #[cfg(unix)] to pull in the right export. And most won't: they'll just support Unix since that's easier.

Is there a precedent for portions of std that are exported for both Unix and Windows from a single place but are not exported at all on other targets?

For Windows releases before this was added, connecting or binding would just fail with WSAEAFNOSUPPORT, which is probably fine.

3 Likes