I have been writing a Zig guide at ziglang.in and it is far enough along to be worth showing.
I have created this for me and my two member zig team. But as the content is tested and all code is working, I thought it is worthwhile to share here.
The reason this content is generated is we are planning to move some of our internal systems related projects from c#, c to zig and we want the minimal breaking changes.
I have been recently using LLM a lot as a learning tool. Sometimes it worked great other times it failed.
I understand the term AI slop comes to mind the moment we see LLM generated code, content or even image.
And it’s fair. But for me it has been a good experience so far and also seeing some bad practice along the way, then referring to zig source code and then direct to fix things.
But the last 6 months, I got it working the way I wanted almost 100% of the time. Interestingly all code developed is under review by my team who are learning as well (and they are not experts).
The full review hasn’t happened as this is a side hustle, yet but slowly we are progressing and improving along the way.
I have been an application/business systems programmer for about 30 years now and also do some graphics, game, DB , framework development in spare time. LLM allows to learn a new programming language much faster.
I am no systems or zig expert
The problem this guide solve is the one most of us have hit: you find a tutorial, copy the example, and it does not compile, because it was written against 0.11 and nobody noticed.
Here the build is the guide. Every snippet on the site is a real .zig
file in the repo. zig build verify
compiles each one, runs it, and diffs its stdout against a checked-in .expected
file. CI runs that on every push and again at 06:00 UTC nightly against current Zig master. If master changes something a snippet depends on, the nightly goes red on an unchanged tree and I go fix the chapter.
Many of the systems, graphics, database I ported from my old code which was in nodejs, c#, Elixir, Custom web frameworks I developed in the past and some in C.
The part I care about most: the .wasm
artifact CI verified is the exact one your browser downloads and runs in the playground. There is no second code path, no separately maintained “example” that drifted from the text.
Clicking Run executes the binary that passed CI. The footer of every page names the compiler version that verified it, currently 0.17.0-dev.1454+5faa79730
.
145 chapters across 11 sections, grouped into four tracks:
139 snippets total.
Two pages are deliberately unverified and say so on the page: the @cImport
chapter needs real headers, and the “coming from older Zig” page is full of examples that are supposed to not compile.