As a youngster I was wandering the demoscene and I coded assembly (mainly Motorola 68000) and C but lost interest around 2K when I was ‘forced’ into heartless programming environments where it became normal for software to need 200 MB to do nothing but warm up processors. Fast forward to now: I would really like to gather and dust off those fun memories and start creating things again, using Zig.
There are loads of learning materials already and a lot is (understandably) outdated. I am aware of Bun, Ghostty, Tiger Beetle and the likes but I find those projects too overwhelming for now. I want to move a little faster so I am looking for nice little up-to-date (close to master) Zig-projects that I can have a look at, preferably the ones that do a good job memory-wise for I come from a land where we blatantly killed off the OS and just rolled stuff at absolute $30000. I think this will save me a lot of time. I appreciate any help finding my initial direction getting back into the flow.
I wouldn’t call it very ‘idiomatic’, but here’s a Pacman clone I wrote quite a while ago (but still keep uptodate):
It doesn’t show many Zig concepts though (e.g. there is no memory allocation and thus also no Allocators or stdlib containers, in fact the only stdlib usage is std.debug.assert(), std.math.clamp() and std.math.pow(), and the entire project is essentially a single Zig file that can be read from top to bottom.
One advantage of this project is that it is basically a 1:1 port of a C99 version that existed earlier, so if you’re familiar with C you can look up how some C constructs would map to Zig:
A slightly bigger project is my 8-bit emulator stuff here, this uses some more parts of the stdlib and is also split into ‘proper’ modules:
Vaxis and Mibu are up-to-date on 0.15.1 which is helpful for seeing new Io interfaces; Zenith is on 0.14 I think but still has lots of great example code.
I want to get it into slightly better shape for any kind of initial release but for me it’s a really really fun project, probably the most fun coding project I’ve ever done…
The thing I really like about Zig is that a lot of projects are up to date, it’s crazy how close all projects follow the master branch. Very talented folks on both sides. Also an additional perk is that these projects, while big in Zig terms, are relatively small communities, thus you can contribute to them, without needing a PhD in CS and 5 years of experience in the language
I am very happy with all your suggestions: it is a great jumpstart. These nice projects combined with the Zig documentation help out a lot. Thank you all!