Repository navigation
Description
Zig 0.16 has landed on April 13, 2026, so it's time to do this all over again :)
In progress PR at #12388
The major breaking change this time is the new std.Io interface that will be part of any code that has to access basically any system interface (filesystem, threads, timers, etc.), and OS-specific APIs like std.posix has almost been completely removed. This will likely be an even greater challenge compared to Writergate due to how much we rely on libxev for these sorts of tasks. I would recommend trying to port the codebase to use a generic std.Io implementation, and polyfilling in the features we need but aren't quite in the standard library yet — then we could either try to run the whole program off of std.Io.Evented, or try to repackage libxev as yet another std.Io implementation.
These Zig dependencies need to be migrated:
-
libvaxis— merged PR: Zig 0.16 port rockorager/libvaxis#316 -
z2d— Zig 0.16.0 release changes vancluever/z2d#169 -
zig-objc— merged PR: Zig 0.16 Compatibility mitchellh/zig-objc#34 -
zig-js— merged PR: migrate to 0.16.0-dev.3142+5ccfeb926 mitchellh/zig-js#10 -
uucode— has switched to Zig 0.16 for its main branch -
libxev— Zig 0.16 Compatibility mitchellh/libxev#220 -
zig-wayland— has switched to Zig 0.16 for its main branch -
zf— Update to Zig 0.16.0 natecraddock/zf#87 -
gobject— New 0.16-compatible release -
zon2nix— merged PR: zon2nix: update to a version that is compatible with Zig 0.16 #12259
Activity
francisqureshi commentedon Apr 12, 2026
I'd love to help out with this, I've been wanting to start contributing on Ghostty for some time and I've been working on Zig Master on my own Zig projects that use zig-objc so can for sure help there as I have a simple fork at the moment.
pluiedev commentedon Apr 12, 2026
If you can make a PR to zig-objc that will be great, as I only have access to a Linux machine :)
pluiedev commentedon Apr 12, 2026
@jacobsandlund Looks like the API changed a lot with the Zig 0.16 branch. I'm not smart enough to figure out how to port our uucode setup to the new system — could you maybe lend a hand?
Update: never mind, I figured this out myself :)
francisqureshi commentedon Apr 12, 2026
Please see PR via: mitchellh/zig-objc#34 - as mentioned this will need a zig-objc 0.16 branch
pluiedev commentedon Apr 12, 2026
In-progress branch at https://github.com/pluiedev/ghostty/tree/zig-0.16 — the port is even trickier than I thought not just because of std.Io, but also because we apparently access environment variables somewhat haphazardly throughout the codebase which means a std.process.Environ object has to be lugged around everywhere. The fact that most of
std.posixgot nuked doesn't help, either.jcollie commentedon Apr 12, 2026
#11172
jcollie commentedon Apr 12, 2026
#11969 does something similar for arg parsing.
ReillyBrogan commentedon Apr 13, 2026
0.16.0 was tagged a couple of hours ago.
jcollie commentedon Apr 13, 2026
Yep. There's a lot of work to do so this won't happen soon.
jacobsandlund commentedon Apr 14, 2026
ah shoot @pluiedev i meant to make a pr before 0.16 went out to make this easier. ty for getting this!
@jcollie's pr on uucode is merged too.
i also intend to switch main to 0.16, maybe in a day or so when i have timeedit: main is now 0.16
jcollie commentedon Apr 16, 2026
Probably should remove all uses of @cImport to get ahead of:
https://codeberg.org/ziglang/zig/pulls/31892
vancluever commentedon Apr 16, 2026
Just looking at the detail here and given the fact that I think z2d will be stable for at least a few weeks before I need to push anything, I'll just leave the Zig 0.16 branch as-is and then tag a new release once the migration is complete here. Will keep an eye out!
2 remaining items
mitchellh commentedon Apr 17, 2026
libxev updated to be compatible with 0.16 (see notes for disclaimers): mitchellh/libxev#220
vancluever commentedon Apr 18, 2026
z2d should now be updated to work with Zig 0.16.0: vancluever/z2d#169
hejdb commentedon Apr 22, 2026
pluiedev commentedon Apr 23, 2026
In progress PR at #12388.
@hejdb It's not as trivial as it sounds. We heavily depend on libxev's proven synchronization primitives while the std.Io.Evented implementation is not really ready for general use yet. The objective right now is to get everything working in the new language version, and reconciling libxev with std.Io is something we can work on later.
ReillyBrogan commentedon Apr 25, 2026
FYI apparently they are doing a shortened cycle for Zig 0.17 and it's expected to be released within a week or two. It's primarily to pull in the LLVM 22 update in order to fix a WASM regression with 0.16.
dribic commentedon Apr 28, 2026
so 0.17 will be LLVM update only?
jcollie commentedon Apr 28, 2026
I think that there will be some small bugfixes but no major new features other than LLVM. But the best place to check for that is on the ZSF Zulip.
vancluever commentedon Apr 28, 2026
BTW, I did end up releasing 0.11.0: https://github.com/vancluever/z2d/blob/v0.11.0/CHANGELOG.md
Will probably end up releasing 0.12.0 off of Zig 0.17.0 when it comes out.
ReillyBrogan commentedon Apr 30, 2026
I noticed that they committed this so there might be other major changes too. What they should really do is branch from 0.16 and cherry-pick just the LLVM support + bugfixes but I'm not a Zig maintainer so 🤷
dribic commentedon Apr 30, 2026
The deletion of @cImport was expected, given that it is now being handled through the build system.
vancluever commentedon May 16, 2026
Just an update as this issue as there hasn't been many updates for a bit: we're still working on this and should hopefully have an update soon in the current WIP PR or one that supersedes it, whatever is easier. Thanks for your patience!
Update to Zig 0.16.0 (#12726)
cli: update list-themes preview sample to valid Zig 0.16 syntax (#14012)