I wanted to try latest Zig to see if I can replicate the problem I found with multi-dimensional array blit on my PinePhone hardware. But I cant find documentation or info on the new build system. It was hard enough to solve this for 0.14.0, but without any examples online I 'm a bit lost.
Can someone show me the new magics required to port the following build script please?
Well, what do the compile errors tell you when you run zig build? And have you tried applying any fixes yourself?
The build system hasn’t changed a lot between 0.14.0 and now, other than that some APIs that were clearly marked as deprecated have now been removed. In particular, you might want to take a look at 0.14.0 Release Notes - Creating Artifacts from Existing Modules and follow the guidance for how to update .root_source_file = b.path(...) to root_module = b.createModule(...).
Thanks both, I’ll have another look. I followed what I thought was the official build system documentation, and what few examples are dotted around the net.
I wasnt aware of modules being a mandatory part of the build process now. I thought they were being added for external dependency management. Always learning
I did try to fight the compiler, but by design it isnt going to tell me what has been deprecated and what to try. I deduced b.release_mode = .small based on what little I could see in the standard library pages. But even that seems wrong, so I am happy I asked.
Are there release notes for 0.15.0 tucked away somewhere? They seem like a treasure trove of information!
Honestly, I find myself just right-clicking something like addExecutable in my IDE and looking at the definition. Then I see it wants ExecutableOptions, which in turn wants a Module. Code as docs, I guess…
Thanks for the tip, my editor was not that well connected. So I just installed Kate to try again with ZLS (assuming that is what you are using?), but I am not sure if ZLS is avail for 0.15.0 at least from the zigtools site, assuming that is the kinda official ZLS.