Why Zig Over Rust for Systems Programming
This post does not say that one language is better than the other. It is about why Zig fits the way I think and work while Rust does not, although Rust has many strengths.
The Question I Asked Link to heading
Many discussions present the choice between Zig and Rust as a debate about safety, because Rust enforces memory safety at compile time and Zig does not. That difference is real and important but it was never the main question for me. What I wanted to know was which language lets me think clearly about what the machine is doing, with the least ceremony between what I want to do and the code I write. After spending a lot of time with both languages, my answer is Zig.
What Rust Gets Right Link to heading
The ownership and borrowing system of Rust is very good engineering. The borrow checker prevents whole categories of bugs that can take hours or days to find in C or C++. Rust also has a mature ecosystem and a large community. For projects that must stay correct under attack, such as browser engines, cryptographic libraries or Operating System kernels, Rust is a strong choice. I am not dismissing Rust, I just do not use it day to day.
Where Rust Lost Me Link to heading
The borrow checker has a mental cost and that cost is not constant. It grows in the areas that systems programmers work with most often, which are raw pointers, custom allocators and arenas and data structures whose ownership does not fit in a strict tree. I often found myself fighting the compiler over things I already understood. I knew what the memory layout looked like and I knew that the lifetimes were correct in practice but convincing the borrow checker became a separate problem that had nothing to do with the systems problem I was trying to solve. Rust has also become a much bigger language. Traits, lifetimes, closures, async/await and macros each add power but they also make it harder to read and maintain code that someone else wrote.
What Zig Gave Me Instead Link to heading
Zig is a small language. It is not a simplistic one, as comptime, the allocator model and explicit error handling all have real depth, but it is small enough that I can keep most of it in my head, even at 2 a.m. during a debugging session. Passing the allocator as a parameter changed how I think about memory. Every function that allocates takes an Allocator explicitly, so there is no hidden global state and I know where memory comes from and where it must go back. This is not safety enforced by the type system. It is my own discipline but the code makes it visible. I also like comptime a lot because it does metaprogramming by running ordinary Zig code at compile time, which means that I can read it and follow it like any other code. Error handling in Zig is explicit as well. Functions return error unions, I handle them with try or switch and the compiler checks that a switch covers every error. There are no exceptions and no hidden control flow, so the failure path sits next to the success path in the source code.
What Zig Gives Up Link to heading
Zig does not protect you from yourself the way Rust does. You can still write use-after-free bugs or overflow a buffer and the compiler will not stop you. What I get in return is code that stays close to what the machine does, so when a bug happens the distance between the source code and the cause is short and I can usually find it quickly. For the kind of systems programming I do, which is UNIX tools, network servers and examples for teaching that must stay readable, I am happy with this tradeoff.
Zig Is Not 1.0 Yet Link to heading
Zig is still before version 1.0 and it changes quickly. The standard library changes between releases and that has a real cost for production work. Anyone who chooses Zig for critical systems should think about that risk carefully. I made the choice knowing this. I find the core design of the language coherent and the team prefers to make breaking changes now instead of carrying old mistakes forward. Zig 0.16.0 was released recently and I believe that the language is going in the right direction.
Conclusion Link to heading
Rust is a serious language and I respect it a lot. I just do not want to use it every day. Zig matches the way I like to think about systems programming, because it is explicit and small enough for me to understand completely. For me that matters more than the compile-time guarantees of a borrow checker.
Update (November 2026): The Hacker News discussion of my Why Zig over C for Systems Programming post also talked about this post and some readers did not like how it was written. They had a point, so I rewrote it in plainer words. My opinions are the same.