Hello NIO Users,
No, this is NOT an April Fool's prank!
As the Windows support has matured, large portions of the Swift ecosystem has become available on Windows. swift-nio provides a wonderful abstraction of the networking APIs and helpers for asynchronous programming that make writing efficient networking programs possible. Since networking is such a common operation these days, it makes sense that one would want to write networking code for their applications.
I'd like to announce that it is now possible to share your networking code written using swift-nio not only on Linux and macOS, but on Windows too! A simple example, here is a screenshot of the
NIOEchoClient from the swift-nio repository running on Windows (please ignore the unsightly debugging output):
The changes for this are on github in the swift-nio repository as a pull request, but the changes are not really in an organized state (it is a single ginormous patch) and there are a few places where the changes are not properly guarded. There is work that is needed to clean up the work and create more manageable changes which can be reviewed. Some of this will require a bit of work to adjust the APIs to abstract out details of the underlying system (e.g. there are cases where the underlying C library is expected to provide the BSD sockets API). However, this work demonstrates it is possible to provide the same API surface on all the platforms enabling cross-platform code.
May your packets flow freely,
NB: for those interested in the patches: https://github.com/apple/swift-nio/pull/1405 is the current dump of my source tree.