Proof of concept: Raylib + Zig + Coroutines

There’s a powerful C-based library called Neco that is a true coroutine library for building truly concurrent single threaded apps.

After seeing if I can get it to work with Zig I was able to bootstrap Raylib with it, making Raylib cooperative and able to run at 60fps with 10’s of thousands of coroutines each animating a single bunny texture.

More details here: zig-notebook/coro at main · deckarep/zig-notebook · GitHub

For some types of projects coroutines offer an elegant solution for modeling animations. It’s one of the huge reasons Lua is still popular.

Anyways, I was delighted that this works!