An async runtime and interface

In light of recent developments of the I/O interface, I decided to research and build an asynchronous runtime in zig.
My primary motivation was to separate the runtime into an executor/reactor model: The executor runs tasks until there are no more ready tasks, then calls the onPark method on the reactor. Futures can submit I/O requests to the reactor , which submits io asynchronously (via io_uring in the current implementation), when the onPark method is called the reactor waits for one of these requests to complete and writes its result back.
I ended up making some more changes that are specified in the project Readme.

You can find the project here: GitHub - urisinger/zig-async

Contributions are welcome! If you need a POSIX operation that’s not yet part of the interface, feel free to open an issue, adding support for new operations typically takes just a few seconds.

4 Likes