Skip to content

update for zig 0.17 - #914

Draft
Yinameah wants to merge 8 commits into
david-vanderson:mainfrom
Yinameah:0.17-compat
Draft

update for zig 0.17 #914
Yinameah wants to merge 8 commits into
david-vanderson:mainfrom
Yinameah:0.17-compat

Conversation

@Yinameah

Copy link
Copy Markdown
Collaborator

WIP. See #839

@Yinameah
Yinameah marked this pull request as draft June 29, 2026 06:36
@Yinameah

Yinameah commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

I just rebased this on latest main. Had to solve a few small conflicts, did not extensively test.

@phatchman

phatchman commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Did you see mlugg's blog post using dvui and fizzy as his example for incremental compilation? Looks like magic. Really looking forward to this! Great work.

@Yinameah

Yinameah commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator Author

Did you see mlugg's blog post using dvui and fizzy as his example for incremental compilation? Looks like magic. Really looking forward to this! Great work.

#839 (comment)

I absolutely know and waiting for this moment for a few years tbh. 🤟
Looking very very much forward for 0.17 tag, so we can make this the default behaviour.

That being said, I'm not sure how the hot-reload lookalike works in that video. I'll need to investigate this at some point.

https://codeberg.org/ziglang/zig/pulls/35428 impacts our dependency tree
big time. And changes in std.lang.Type is breaking for a lot of code
that does introspection.

I was initially hoping to get most working in one big commit, but it's
going too deep.

This commit is the minimum to make `zig build sdl3-standalone
-Dbackend=sdl3` work.
CAUTION : at time of writing, failing to pass `-Dbackend=sdl3` will
fetch dependencies that will prevent the build. You might need to remove
them both from global cache and from `zig-pkg`. See https://codeberg.org/ziglang/zig/issues/35652

Had to fork quite some dependencies, context annotated in `build.zig.zon`.
This took much more energy than anticipated, because it depends on
zemscripten, which took me a while to grasp and update as well...
Running out of steam chasing the dependency tree.
Commenting out what doesn't work so that `zig build` doesn't fail.

Grep for `FIXME 0.17`
- Mainly std.builtin.OptimizeMode enum name that change and some
  @backingInteger stuff that zig fmt took care of for me :-)
- Couple of dependencies updated in my forks
- Did not test extensively all backends

And I want to take a second to praise zig incremental compilation. The
cost of changing this small things is just sooo small when you have
instant feedback.
Only change is svg2tvg and only because of one small change in it's
xml dependency. (this guy : ianprime0509/zig-xml#71)
@Yinameah

Yinameah commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

rebased on main and tested with 0.17.0-dev.1640+2597da025 (only sdl3 actually)

I mean tested on sdl3 only, the rest probably works as well, or requires minor tweaks that will be waaay easier to do after zig's 0.17 release.

@david-vanderson

Copy link
Copy Markdown
Owner

Note it looks like @kristoff-it is building on this in the 0.17.x branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants