Hi. As food for thought, I am interested in finding out if swift-nio can be used with libuv. Their architecture seems similar and compatible from a bird's eye view.
However, I am getting a bit lost at what custom parts need to be written and in which order. Any advices / guides?
However, when I tried running it on windows, nio immediately failed to compile: .checkouts\swift-nio\Sources\NIOConcurrencyHelpers\lock.swift:229:37: error: value of type 'LockStorage<Void>' has no member 'mutex' self.mutex._storage.mutex,
It feels like a bug to me because there are clear windows specific conditionals in that source file. Can anyone from the NIO team try compiling it on windows again?
Oh, wow. I managed to compile swift-nio on windows (mostly by dropping stuff that required Posix and by fixing some typos in windows related parts)
It even passes the remaining tests. (Lots of warnings while building, however)
I then managed to import it into my transport services project on windows and build them successfully together. Tests are built successfully too.
Unfortunately, my own tests refuseto run and I cannot figure out why... It shows that the build was a success and then drops this message (and nothing else):
libuv uses a global lock and for very high IO/throughput loads it tends to struggle. This is a Julia talk recently about using libuv and its bottlenecks.
I just wanted to let everyone interested know that I managed to wrap libuv in a swift wrapper and it runs on windows too. I decided to split it into a separate project from the nio transport services. My wrapper currently supports creating a custom executor and a tcp server. But it is rather straightforward to add any other missing features in the future. I still need to apply a few convenience patches because the windows build has some quirks.