Update Zig to 0.16.0#13
Conversation
| pub fn main(args: std.process.Init.Minimal) !void { | ||
| var arena_state = std.heap.ArenaAllocator.init(std.heap.page_allocator); |
There was a problem hiding this comment.
I don't like the use of args here. I don't know why @IntegratedQuantum used args in the other update. but this should be named init
Wunka
left a comment
There was a problem hiding this comment.
Thanks for doing this!
It doesn't change much but even this work is needed.
I don't see anything that is directly bad. But I also never played with the build system that much around.
So from my side you have the approve.
Now its time to wait on quantum to review
IntegratedQuantum
left a comment
There was a problem hiding this comment.
Did you also check if the created libraries work in the game?
I'm new to Zig and I thought this might be an easy first issue.
Honestly the only reason I didn't do it myself, is because I didn't see that the glslang repo moved to codeberg so I thought it was abandoned.
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
I thought I did, but only now did I discover you have to pass -Dlocal=true. I tested and it seems to work normally in debug. I tried to build with -Doptimize=ReleaseFast and got a bunch of errors like But that happens without my changes, too, so I'm guessing I just missed something in the release build of the libs. I'd also like to ask: In the 0.16.0 release notes, instead of adding root_module to a bunch of lines they do a single Finally, if there are no objections, I'm gonna try my hand at moving stb_image and stb_image_write to build system dependencies, as well as update the rest of them. |
IntegratedQuantum
left a comment
There was a problem hiding this comment.
I'd also like to ask: In the 0.16.0 release notes, instead of adding root_module to a bunch of lines they do a single .root_module = b.createModule(.{ and work on a Module instead of a Compile. Is that something that would make sense in this build.zig?
For now I'd say we keep it as is, but if they continue moving more stuff to the module, it might make sense to do it like that.
I just missed something in the release build of the libs.
You can test them with zig build release (though macos will likely fail, as it requires some additional setup currently), release builds are done with ReleaseSmall, since none of these libraries are relevant for performance to reduce download volume.
At some point I would also like to have a CI step to document the exact process PixelGuys/Cubyz#3020
But either way I can confirm that it builds for all operating systems
Finally, if there are no objections, I'm gonna try my hand at moving stb_image and stb_image_write to build system dependencies, as well as update the rest of them.
Yes, I would appreciate that.
Fixes PixelGuys/Cubyz#2931.
I tested it locally and it seems to work. I'm new to Zig and I thought this might be an easy first issue. I mostly copied what was done in PixelGuys/Cubyz@133b472 but I would still appreciate an extra hard look.