Mach v0.1 - cross-platform Zig graphics in ~60 seconds

Five months ago we announced some of our vision for Mach & the future of graphics with Zig. Today we’ve reached Mach v0.1 with over 1,100 commits. Cross-platform graphics in 60 seconds If you have Zig v0.10 you can get started with cross-platform graphics in under 60 seconds, try it for yourself: git clone https://github.com/hexops/mach cd mach/gpu zig build run-example (not working? see known issues) All you need is zig, git, and curl.

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. Here I will try to guide you into choosing the right hashmap type. 60-second explainer You probably want: varmy_hash_map=std.StringHashMap(V).init(allocator);Or if you do not have string keys, you can use an Auto hashmap instead: varmy_hash_map=std.AutoHashMap(K,V).init(allocator);Where K and V are your key and value data types, respectively. e.

Let's build an Entity Component System from scratch (part 1)

In this multi-part series we’ll build the Entity Component System used in Mach engine in the Zig programming language from first principles (asking what an ECS is and walking through what problems it solves) all the way to writing an implementation in a low-level programming language. The only thing you need to follow along is some programming experience and a desire to learn. In this article, we’ll mostly go over the problem space, data oriented design, the things we need our ECS to solve, etc.