How I’m learning Zig and Rust
I’ve been a PHP developer all my life. I started using it decades ago with the WordPress CMS. Initially, my only goal was to create a personal blog where I could share about learning English online1, which I did: inglesnarede.com.br2. Much later, I noticed people were willing to pay to have their own sites. If someone asks me today how I got to use PHP in the first place or how I became a developer, that’s why.
In the process of creating sites for a living, I learned a lot about how web sites are made, and later, how computers work. But most of my experience has been in a superficial layer. By that I mean: have I ever written a compiler? No. Do I know how they work? Also, no. Here, I’m not even considering if I should know or do those things.
But it shows that a lot of the technologies I use, even to create sites, which is my job, are unknown to me at a deeper level. How they work internally, their architecture. There are many layers of abstraction between what the computer is doing and what we see on the screen of a MacBook Pro laptop.
In a nutshell, I feel, even more recently, that my knowledge of how computers work is incomplete. There are huge gaps, possibly empty spaces. And that’s one of the reasons why I’m starting to learn the Zig and Rust programming languages. That’s not the only reason, though. Let me elaborate.
Why learn new programming languages
Zig is a good language to learn how computers work.
— Andrew Kelley (Zig creator)
I saw this quote from Andre Kelly, in a recent interview that sums it up pretty nicely. That’s my answer to the question, why I’m learning Zig and Rust.
I’m interested to understand how those languages talk to the hardware; how they handle memory; how they deal with latency; the mental models used to write software using them. As system programming languages, how are they different than PHP? What’s the experience like of writing code in Rust or Zig?
Those, system, programming languages live in a lower section of the computer abstraction. A section that I don’t travel very often. But interestingly, it is a section I hope to understand more about how it works. For me, it is also an interesting intellectual challenge.
But why Zig? Why Rust? There are several other lower level languages. Why did I choose those two? Disclaimer: I haven’t done a lot of research on them. I’m also not choosing “the best” programming language to learn. My decision is purely personal and subjective. A gut feeling.
…always preserve excitingness.
… When in doubt, optimize for interestingness.
…In most cases the recipe for doing great work is simply: work hard on excitingly ambitious projects, and something good will come of it.
— Paul Graham on doing great work.
I’m genuinely interested in Rust and Zig. And I believe this fascination towards those languages will help me learn them better. Nothing can beat interest, right?
My interest in Rust is not old. It began when I started to use the following tools: Oxlint and Oxfmt, and recently the Zed (code editor). The performance improvements of Oxlint, for example, for linting is impressive. That got me wondering what they were doing to get such “magic”. But truth be told, similar to Charlie Marsh, my interest in Rust could be attributed to its hype.
For Zig, my interest in it is even more recent. What sold me on it was their community and how they are approaching contributions. In this new coding world where we are losing more and more contact with the code due to LLMs, they seem to be doing something different. Zig also appears very educational. Tuned for those like me, hoping to learn “how computers work”. I also like that they are a non-profit.
How I’m learning Zig
My process for learning Zig and Rust is very similar. First, I always start with a book. Reading is one of the best ways for me to learn anything, really.
I got a copy of the “Learning Zig” book from Alex Rios3. The book was recent enough, from Nov 2025. It was written for someone with programming experience, like me. Its vocabulary is simple and easy to understand. Oddly, it is a bit too cheerful to my taste, sometimes. =P
I have the Zed code editor set up with their Zig extension. Too early to say how useful it is. For now, a pretty and colorful syntax is what I get.
Zig has a Learn page with a lot of resources that I have purposefully not read them yet. And I saw recently that Andrew Kelley recommends using Ziglings for newcomers. So I hope to get to those after I finish the book.
So my current plan for Zig is to:
- Read the “Learning Zig” book. Do its exercises. Experiment with them. Etc.
- Move to the Ziglings exercises.
- I hope, by this point, a lot of the syntax will have become familiar.
- I will likely build some kind of project for fun4.
How I’m learning Rust
My learning approach for Rust will be very similar to the Zig one. Starting with a book: I picked up The Rust Programming Language [Rust 2024] by Steve Klabnik, et al. I did some quick research on the available options and this one seemed recent enough, and with good reviews. Perfect for “beginners”.
However, my interest in Rust is less about understanding how computers work, even though I’m sure it’ll help me understand that too, but more about one of their selling points: speed. How come projects like: Oxlint, Oxfmt, Mago, Zed, PHPantom LSP, Oxide, (with their CPU), and so many others can get such good performance by using Rust? What’s Rust magic?
At least right now, Rust to me is synonymous with speed. Or at least the possibility of creating very performant software using it.
So my current plan for Rust is to:
- Read The Rust Programming Language [Rust 2024] ) by Steve Klabnik, et al.
- Rust has some exercises too via its Rustlings. I’m gonna try those next once I feel I have an understanding of the language.
- I will probably build the same small project with Zig and Rust, for comparison.
- I’m happy to hear about any good resources.
Coda
That’s it, really. That’s how I plan to learn Zig and Rust. It essentially goes down to: read a few books slowly and methodically. Try the exercises from those books, experiment with them, dig into concepts and topics as they come along. The goal is not to memorize the programming language, but to learn how computers work.
Maybe that’s totally the wrong way of doing this kind of thing. I don’t know. But I know that motivation is one big part of the process, and I’m very excited about this new journey with those languages. I’m looking forward to getting surprised or more likely confused about some obscure bug5.
=)
I’m a self-taught English speaker. Meaning that I learned English outside of a structured paid English course. Which feels like you are learning things without understanding what you are doing. ↩
I’ve built several redesigns for this blog along the years and all of them helped me to try new things, learn about new technologies outside of my daily work, and be a better developer. ↩
I was gladly surprised about Alex being a Brazilian. It always makes me happy to see my people, Brazilians, creating interesting things. ↩
I’ve been playing with drones: using PHP in drones. So unsure what I’m gonna build with Zig once I’m good enough to build something. But building some kind of drone integration is a possibility. ↩
Which I’m pretty sure will be likely caused by some memory allocation. =P ↩