zigtips articles
Zig tips: v0.11 std.build API / package manager changes
With Zig v0.11 will come several changes to the std.build API. We've just updated Mach to the latest nightly Zig version, and wanted to provide some tips on how to update your own Zig code.
Debugging undefined behavior caught by Zig
Unlike other toolchains, Zig enables many more safety checks by default. We've caught undefined behavior in GLFW, the DirectX Shader Comppiler, and Google Chrome's WebGPU implementation as a result. But debugging these situations can be a bit tricky sometimes, so here's a walkthrough of how to debug such an error using Zig and LLDB.
Packed structs in Zig make bit/flag sets trivial
As we've been building Mach engine, we've been using a neat little pattern in Zig that enables writing flag sets more nicely in Zig than in other languages. Here's a brief explainer.
Zig hashmaps explained
If you just got started with Zig, you might quickly want to use a hashmap. Zig provides good defaults, with a lot of customization options.