Cross-Platform 'libuv' Wrapper Proof of Concept

Hi. The first working proof of concept for a cross-platform (Mac and Windows are tested) swift wrapper for libuv is ready. It currently features a custom task executor and a TCP server with an example of a straightforward concurrency integration.

To use the wrapper, please ensure that libuv is properly installed.
For Mac: GitHub - libuv/libuv: Cross-platform asynchronous I/O
For Win: GitHub - libuv/libuv: Cross-platform asynchronous I/O

Swift 6.0 is required and if you are to build on Win, please use provided pwsh scripts for a quick-start. (Starting with set-env.ps1)

It is a bit of a mess as POC but a great fun indeed! Feel free to tinker with it.

Thank you for your attention.

6 Likes

Very nice. Is there a specific reason why you don't build libuv from source? That way you wouldn't need to install libuv separately and would simplify the set up, at least for Windows. I have a package sebbu-c-libuv (mainly for my own use) where I build it from source, which you are free to copy and modify it as you like if you decide to go that path :)

Thanks. No particular reason other than me lacking experience with CMake and similar tools for native C building. Although it would have solved any linking/installation issues if we could build libuv directly from the swift package.

In any case, patches are welcome!