If you want a good source of zig learning material interactive and by examples please check out ziglings: https://codeberg.org/ziglings
It's writen and tested by humans, which is essential for learning purposes. It's listed in the official zig website, by the way.
This project is always up to date to the latest zig release.
The builtins donβt even compile in these examples. This is 2 years out of date at least.
- Learning Zig by Karl Seguin: https://www.openmymind.net/learning_zig/
- Free project-based online book Introduction to Zig by Pedro Park: https://pedropark99.github.io/zig-book.
- Ziglings, almost working programs you need to fix: https://codeberg.org/ziglings/exercises
Examples target Zig 0.14.
Been some significant changes since then, not least to printing and formatting (see writergate).For now, I have a basic grasp of C#, a little Python, a little C++, and a little TypeScript. I also know Java to some extent, but honestly, what I mostly build is CRUD app assembly. To go deeper, I think I need to dig into a systems language. But I'm not sure whether to invest in Zig or Rust.
nowadays before reading or buying any book, we need to extensively investigate the author, the author name is now more important than ever, i think whenever a book is shared, the author need to me highlighted
I'm sure this can be rationalized in some way, to either simplify parsing or solve some rare ambiguity, but I just don't see it.
I know this is a minor thing and can be considered as nitpicky, and I expect some friction with syntax when learning a new language, but I just can't stand things I see as gratuitous. Same with the forced use of _ = foo(.{}); to avoid compiling errors...
> To go deeper, I think I need to dig into a systems language
Most of such code is still written in C.
But honestly, if you just need to squeeze a little bit more performance, you should check the non-GC part of C# first (ArrayPool, Span, stackalloc).
https://www.youtube.com/watch?v=iqddnwKF8HQ
Personal thoughts: I think Zig will become more stable once 1.0 tag released. Currently I cant find a fix to my error in net. But the folks on Zig Discord server helping me out.
I don't think in your shoes I'd prioritize learning Zig for any of these domains, though, for a few reasons:
* It's not a pre-req for understanding some existing corpus of important software (which is a big reason for C and C++ in 2026) or the language of choice for some current hot domain (as Python is for AI).
* It's not memory-safe, which (whether via GC or Rust's borrow checker) is increasingly viewed as a critical security attribute.
* It's not stable yet, so I'd expect a certain amount of running to keep in place both in your learning and in avoiding bitrot in anything you write in it.
* From the outside, the community seems strangely hostile as well as elitist.
A few I might suggest instead: Rust (both as a language I personally like and as the most different from the ones you've already touched), Go (which is a good choice for employability), SQL (maybe you already know this one if you're doing CRUD stuff but you didn't list it), bash, and more Python and/or TypeScript.
Explicitly discarding return values is a thing many modern programming languages force you to do.
You don't do this? This is only for varargs or optionals.
.{<stuff>} is just a shorthand for Type{<stuff>} (struct constructor) plus, "hey compiler, you figure out the type". So if anything it's LESS noisy than the alternative, and more forward-compatible if you change a type name for example.
var foo: Foo = Foo{};
There's two ways to shorten it: var foo = Foo{};
var foo: Foo = .{};
It can infer the type of the var from the right hand side; or the type of the right side from the type of the var.So when you see .{} as an argument, it is inferring the type from the function signature. It happens to be empty only because it's using default values (or is a tuple with 0 items).
Edit: fixed the extra dots.
Currently, doing something with Zig as a target language would spend many more tokens and produce subpar results.
So unless you work in another domain where you do a lot of low level programming, then every time you drop down you will be out of practice. This favors using a simpler low level language, with low friction for integration. Rust and C++ don't handle being used infrequently, but C with it's simpler standard library and syntax fits this nicely. But it doesn't have things you expect for a modern programming language, and it is also has a lot of dangerous footguns that are easy to forget if you are out of practice
In comes Zig. It's low level, comes with it's own toolchain that makes it pleasant to work with, easy to cross compile, has more safety features built in that C, but is not overly complicated. The code tends to be more verbose, but also more straightforward. So it's a perfect language to pair, when you know you won't be able to do everything in a high level language.
For me that's what seals the deal. I'd argue that Odin has a nicer syntax, but there is a reason that tools like cargo-zigbuild^1 exists. The fact projects not related to Zig are willing to ship Zig toolchains to make lives easier is a testament to how seriously Zig takes this.
With this in mind: Does anyone here program in Zig, or know someone who does who is not a current C (or C++) programmer?
It's honestly a great read as a human but also I packaged it as a skill and saw coding agent improvement, especially around memory usage.
3. https://github.com/tigerbeetle/tigerbeetle/blob/main/docs/TI...
From there you can derive a set of tools and references that you can build skills on.
Any LLM can scratch together an MCP server, its basically FastAPI + functionality. Your goal, then, is to identify the subset of tools and data required to get 'good' output.
If you want to test your MCP server implementation, grab the source of several popular zig projects, rewind their git history, and have your LLM of choice attempt to address PRs for issues on those repos. Compare LLM solutions with the repo solutions, grade on token spend, LOC produced, variance from Zig best practices, and so on.
[1]: https://github.com/rockorager/zigdoc [2]: https://github.com/rockorager/ziglint
Until then, use mise, nix, docker, or something similar. (You should be doing this anyway for projects in all languages if you care about them building on anyone's machine other than your own.)
I mean not really. You read a paragraph or two and notice the quality of the text, start getting suspicious and continue two or three paragraphs more, notice some very basic inconsistencies/incoherence, realize it's AI-written and ctrl+w the tab (or put back the book in the shelf) and move on with your life.
If there is no samples of the book, I'd hesitate to even consider buying it, just so you can actually sample the text. Very easy in bookstores luckily, so not a huge problem in the end.
Most recently I have used zig for:
Linux USB driver for a proprietary industrial digital camera that claude hacked the protocol for (I usbpcap'ped it), bound into an embedded Elixir-Nerves biology workstation. Same workstation has a libtoupcap digital camera for a microscope camera also mounted (here I use zig for the dlload boundary with elixir). The proprietary system I am running it on ironically won't work with windows anymore because the proprietary software it shipped with chokes when there are two cameras attached.
I ship zigler, the embed-zig-in-elixir library. I keep finding more and more uses for it!
Zig is a very interesting and well built language, but it is also niche, unstable and not offering radical improvements over C.
C, as the foundation of all modern kernels and system tools, among many other things, is extremely unlikely to go away soon.
Everything you do in Zig can be done almost in the same way in C or C++.
I would say the real value of Zig is in the standard library that is more modern and arguably better.
All of that is investment, and not all languages pay off that investment.
Can you do this in C?
And the compiler should be just a bit smarter to avoid the .{} thing when it is not strictly necessary.
1) It's var foo = Foo{...}; (no intervening dot)
2) I think parent commenter is referring to function call use case call_my_func(.{...})
Today most people write entirely stableβ Rust, and as somebody else mentioned Rust uses Editions to allow it to make any remaining language improvements, but if you were writing mostly unstable Rust you would see a reduced version of the same churn. Last month you could foozle.boozle() and that gets you a Wibble, but then you upgraded and now foozle doesn't have a boozle method, and apparently Wibbles no longer exist at all, everybody says you need to learn about Wumps instead now because those are apparently better or something?
β If you don't use a "nightly" build of Rust or a special opt-in "nightly mode" your Rust compiler only recognises the stable language.
What's your plan for this? Rebuilding the C varargs mess from first principles?
A hands-on introduction to Zig via annotated examples. Zig is a general-purpose, compiled systems language focused on robustness, optimality, and simplicity β no hidden control flow, no hidden allocations, no preprocessor.
Written by Dariush Abbasi for Boring College
content/NN-name.md β the annotated chapterexamples/NN-name.zig β the runnable sourceEvery code block in content/ mirrors the matching examples/*.zig file
and has been compiled against the target Zig version.
Install Zig 0.16.0 β brew install zig on macOS, or grab a tarball from
ziglang.org/download. Then:
$ zig run examples/01-hello-world.zig
Hello, World!
A few examples need extra flags:
$ zig test examples/31-testing.zig # tests
$ zig run examples/44-c-interop.zig -lc # link libc
Io interfaceZig by Example is inspired by Go by Example by Mark McGranaghan. Examples target Zig 0.16.
Contributions welcome β see CONTRIBUTING.md.
2) Adressed in the last paragraph.
I am generally against the idea of language support for meta-programming, even using C macros or C++ templates.
I do a lot of meta-programming/codegen with external tooling.
https://ziglang.org/documentation/master/#Result-Location-Se...
It's a little bit weird, since the types flow in the reverse direction than you would expect.
That's not an answer. There's a reason why you can't do it in C, and the reason is "the stdlib is poorly designed". No amount of linting can get you around that.
A new modern C standard library would be a very good thing. But I am ok writing my own, tailored for my own needs and style.