Status of swift-nio on Windows?

I wanted to find out the current status of swift-nio on Windows and if anybody was actively working on the port?
My reason for asking is because as part of the work for moving swift-corelibs-foundation from curl to async-http-client all of the supported systems would need to be able to run swift-nio and this would be a blocker on merging the changes when they are done.

I personally do not have any Windows expertise so would not be able to do this work, but would it be a viable project for someone to undertake for GSOC 2021 if a suitable mentor can be found?

See SwiftNIO & Windows

1 Like

cc @compnerd

I've been working on the port on and off. At the moment, I'm looking at some other things (the last attempt stalled out after some trouble with the vectored IO handling ran into some issues in the current modelling in NIO).

I have all the existing work that I had done on GitHub as PRs that someone could use as a starting point. However, my experience thus far has been that NIO regresses extremely rapidly due to the continual introduction of new POSIX only interfaces under the assumption that they are universal.

There are still large pieces of work to be done, including the vectored IO handling, the message control handling, the remaining reabstraction of the POSIX and SuS interfaces such that other platforms can provide a semantically incompatible implementation, and of course the handling of the IO loop (epoll, kqueue would need a replacement with a completely foreign IO Completion Ports (IOCP) model) off the top of my head. The other problem is that there are places where NIO leaks the underlying interfaces which need wrapper types (or perhaps make NIO expose the WinSock standard).

Unfortunately, I cannot scale infinitely and the NIO port is a fairly large undertaking. I definitely would be happy to have help. The one thing about this particular case is that it would need a good understanding of Windows, Linux, macOS, Unix networking, WinSock, and potentially other pieces as well. If someone has a strong grasp on all of these fundamentals, it may be viable to have a GSoC student make some incremental progress.

4 Likes

That's a really helpful summary of the current situation, thank you :slightly_smiling_face: