Zig – io_uring and Grand Central Dispatch std.Io implementations landed

Devlog ⚡ Zig Programming Language Download Learn News Source Join a Community ZSF Devlog Devlog This page contains a curated list of recent changes to main branch Zig. Also available as an RSS feed . This page contains entries for the year 2026 . Other years are available in the Devlog archive page . February 13, 2026 io_uring and Grand Central Dispatch std.Io implementations landed Author: Andrew Kelley As we approach the end of the 0.16.0 release cycle, Jacob has been hard at work, bringing std.Io.Evented up to speed with all the latest API changes: io_uring implementation Grand Central Dispatch implementation Both of these are based on userspace stack switching, sometimes called “fibers”, “stackful coroutines”, or “green threads”. They are now available to tinker with , by constructing one’s application using std.Io.Evented . They should be considered experimental because there is important followup work to be done before they can be used reliably and robustly: better error handling remove the logging diagnose the unexpected performance degradation when using IoMode.evented for the compiler a couple functions still unimplemented more test coverage is needed builtin function to tell you the maximum stack size of a given function to make these implementations practical to use when overcommit is off. With those caveats in mind, it seems we are indeed reaching the Promised Land, where Zig code can have Io implementations effortlessly swapped out: const std = @import ( “std” ) ; pub fn main ( init : std . process . Init . Minimal ) ! void { var debug_allocator : std . heap . DebugAllocator ( . { } ) = . init ; const gpa = debug_allocator . allocator ( ) ; var threaded : std . Io . Threaded = . init ( gpa , . { . argv0 = . init ( init . args ) , . environ = init . environ , } ) ; defer threaded . deinit ( ) ; const io = threaded . io ( ) ; return app ( io ) ; } fn app ( io : std . Io ) ! void { try std . Io . File . stdout ( ) . writeStreamingAll ( io , “Hello, World! \n ” ) ; } $ strace ./hello_threaded execve(“./hello_threaded”, [“./hello_threaded”], 0x7ffc1da88b20 /* 98 vars */) = 0 mmap(NULL, 262207, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f583f338000 arch_prctl(ARCH_SET_FS, 0x7f583f378018) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 prlimit64(0, RLIMIT_STACK, {rlim_cur=16384*1024, rlim_max=RLIM64_INFINITY}, NULL) = 0 sigaltstack({ss_sp=0x7f583f338000, ss_flags=0, ss_size=262144}, NULL) = 0 sched_getaffinity(0, 128, [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31]) = 8 rt_sigaction(SIGIO, {sa_handler=0x1019d90, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x10328c0}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 rt_sigaction(SIGPIPE, {sa_handler=0x1019d90, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x10328c0}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 writev(1, [{iov_base=”Hello, World!\n”, iov_len=14}], 1Hello, World! )

Source: Hacker News | Original Link