November 1, 2025
Async is back—hold my keyboard
Async/Await is finally back in Zig
Zig brings back async/await—fans cheer, skeptics call it a mistake, chaos ensues
TLDR: Zig reintroduces async/await with a redesigned, swap-friendly system for handling files and networks in 0.16.0. The comments erupted: some say async is a mistake that infects code, others blame operating systems, while a few cheer Zig’s cleaner approach—making this big for how apps juggle waiting on files and networks.
Zig just flipped the switch: async/await is back, redesigned and aiming to dodge the messy “two colors of functions” problem that haunted JavaScript. Devs say the new I/O setup lets you swap how code waits on files and the network like a plug-in, with PR #25592 merged and the feature headed for version 0.16.0. Early testers note Linux gets the shiny io_uring first, while macOS’s kqueue isn’t ready—cue jokes about Mac users being “left on read.” Andrew Kelley’s post warns that mixing errors and waiting incorrectly can leak resources, so Zig’s cancel and await aim to be safer by design.
Then the comment section exploded. One camp went full scorched earth: “async was a mistake,” comparing it to the notorious C++ exceptions and calling it code that “infects” entire projects—Python got name-checked as a cautionary tale. Another camp said the real villain is the operating system: why aren’t kernels giving us lighter threads so languages don’t need fancy gymnastics? Meanwhile, a DIY crowd flexed: forget async/await, “30 lines of assembly” can make coroutines, mic drop. Curious onlookers asked how async/await conquered the world when some top Rust libraries skip it.
Meme patrol: people turned “colored functions” into UNO cards (“Draw 4 errors”), and someone quipped “You had me at io_uring.” Fans love Zig’s plug-and-play direction; skeptics say, nice try—this saga isn’t over.
Key Points
- •Zig has reintroduced async/await through a redesigned async I/O API, merged via pull request #25592.
- •The new framework targets release in Zig version 0.16.0; early access is available by compiling master or downloading the latest tarball.
- •The redesign aims to avoid the “colored functions” problem and to differ from approaches in Go, JavaScript, and Rust.
- •The I/O API is modular, allowing selection of single-threaded, multithreaded, or event-driven (async) backends via `std.Io.Threaded` and `std.Io.Evented`.
- •Current dev builds implement `io_uring`, while the macOS `kqueue` path was not yet available, impacting `std.Io.Evented` on that platform.