It's libuv. In a box. With wheels.




depends on libuv version 1.8.0-r1

libUV bindings for swift. This is still very much a Work-In-Progress, meaning and a lot might (and very likely will) change. Stay tuned.

Installation using Swift Package Manager

  • Make sure libuv is installed

    clone the repo and checkout to the v1.8.0 tag. install according to the documentation

  • Add this line to your Package.swift file.

    .Package(url: "", Version(0,0,1))


Import SUV, write some code, and start the event loop.

    /* /project/path/Sources/EchoSerer/main.swift */

    import SUV

    let server = TCPHandle(Loop.defaultLoop)
    server.bind(Addr(AddrIn("", 8000)))

    StreamHandle(server).listen { connection, status in
      let client = StreamHandle(TCPHandle(connection.loop))

      client.accept(connection) { stream, result, buffer in
        WriteRequest().write(stream, buffer) { request, status in

          client.close { $ }

More Examples Can be found at the SUVExamples repo