2022 ends in an hour, and new opportunities open. I am filled with optimism, pessimism, fear, and excitement. A walking, talking contradiction of life at your service.
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.
A 700+ commit complete rewrite of mach/gpu (the WebGPU interface for Zig) has been completed, enabling seamless use of Dawn (Google Chrome's WebGPU implementation) for native Zig applications.
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.
In this series we build Mach Engine's Entity Component System from first principles in the Zig programming language. In part one we looked at how ECS relates to data oriented design, in part two we look at database design and how it relates to ECS as we begin writing our implementation.