| ▲ | morkalork 7 hours ago | |||||||||||||||||||||||||||||||
Can I hop in here and ask: As someone who hasn't done any systems programming in a decade, what would be more interesting to learn on the side, Zig or Rust? I've been in the Python world and seeing tools like uv and ruff, makes me biased towards Rust but Zig seems to be attracting a lot of hype recently? Edit: Thank you all for your responses! | ||||||||||||||||||||||||||||||||
| ▲ | flohofwoe 6 hours ago | parent | next [-] | |||||||||||||||||||||||||||||||
IMHO you should spend one weekend with tinkering with Rust and another weekend tinkering with Zig (e.g. up to a point where you can write simple but still not completely trivial programs both in Rust and Zig), and then decide for yourself which one better matches your taste. For some people the huge 'surface area' and strict type system of Rust is a big turn-off, while others want exactly that from a programming language. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ▲ | hackermailman 4 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
Brown PLT group has a lot of Rust resources like a debugger for traits https://cel.cs.brown.edu/blog/an-interactive-debugger-for-ru... a model of ownership types https://blog.brownplt.org/2023/09/17/rust-ownership.html and an experimental rewrite of the Rust book https://rust-book.cs.brown.edu/ Systems programming can be done in ocaml or any language really where there is some documentation on the runtime how not to trigger the GC or flags that can be passed to custom set GC policy | ||||||||||||||||||||||||||||||||
| ▲ | simonw 6 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
There was an interesting post comparing Zig and Rust and Go here yesterday: https://sinclairtarget.com/blog/2025/08/thoughts-on-go-vs.-r... Hacker News discussion: https://news.ycombinator.com/item?id=46153466 | ||||||||||||||||||||||||||||||||
| ▲ | matklad 6 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
You need to learn both. Both borrow checker (Rust) and comptime (Zig) are huge ideas worth getting your hands dirty with. If you don't have time to learn both, then learn Zig, as it requires much smaller time investment (though do try to find time for both). | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ▲ | grayhatter 6 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
Why not learn both? For hobby projects, zig will get you *much* closer to the underlying system. So if your goal is systems programming where you're responsible for and get to play with the system itself. Zig will get you there much faster, and the language wont take much time to learn and have fun with. Surely someone will now attempt to correct me, by asserting it's impossible for anyone to write safe code without rust, and it's improper for me to even suggest Zig. But I'm enjoying the language a lot. It's easy to pick up and understand, and importantly it gets out of your way quickly so you can build exactly the system you want. For more complex or professional projects however, I would still recommend Zig but more because I can't stand rust. It bothers me that it rejects valid programs because the compiler is unable to prove what I can. So the additional dance rust requires ruins an otherwise fine language. edit: my default language before zig was also python, so feels reasonable to also mention that I'm pretty sure it'll be significantly easier to transition from python into Zig rather than into rust. There's a number of idioms and expectations from python that fit well in zig, but dont fit in rust. | ||||||||||||||||||||||||||||||||
| ▲ | lacker 5 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
I feel like Zig is closer to "better C" and Rust is closer to "better C++". So I'd pick based on whether you are more in a C mood or a C++ mood. | ||||||||||||||||||||||||||||||||
| ▲ | jgilias 4 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
Have you done any ML-lineage languages before (ocaml, Haskell)? If yes, did you like it? If yes, the answer to your question is probably Rust. The thing about Rust is that it’s kind of this Frankenstein language with a lot of foundational influence coming from ML lineage languages (algebraic data types, traits, combinator heavy programming, etc) but with curly braces and memory management part unique (lifetimes) part modern C++ (smart pointers). I see Zig as being a lot more in C tradition and lineage with nicer and safer memory management techniques. Also comptime (Lisp-ish there?) My two cents | ||||||||||||||||||||||||||||||||
| ▲ | 5 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
| [deleted] | ||||||||||||||||||||||||||||||||
| ▲ | smj-edison 4 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
I see people say that if you like C you'll like Zig, and if you like C++ you'll like Rust. I kinda disagree, since both languages take a lot from C and C++. Rust feels like "let's take the best safety features from both", while Zig feels like "let's take the best transparency from both". In a way, Rust's traits are more foreign to C++ than Zig's comptime, as Zig has similar duck typing (though the ergonomics are much cleaner, especially with @compileError). | ||||||||||||||||||||||||||||||||
| ▲ | SatvikBeri 6 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
I'm in a similar position, I want to learn both eventually but chose to start with Rust because it has several really strong-seeming (like the intro book, or Rust Atomics and Locks), while Zig doesn't have many books yet. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ▲ | bbkane 6 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
I totally agree with the "try both", but if part of your motivation to learn one is to use it for a job, Rust is more mature than Zig (Zig is not yet 1.0, and still making exciting breaking changes to the languag), and Rust currently has more adoption than Zig- parts of Firefox, Chrome, Android, Windows, Linux, AWS, Azure (and I'm sure thre are more). Zig is gaining integration into larger projects (Ghostty, TigerBeetle, Roc, Ubers build system come to mind), but it's not yet achieved Rust's success | ||||||||||||||||||||||||||||||||
| ▲ | the__alchemist 6 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
Short answer: If you like to use pointers in business logic (E.g. not just for MMIO and addressing physical memory): Zig. Otherwise: Rust. Note that there are a number of domains where Zig might be a practical option in the future, but aren't now due to library support. With Rust, you will reinvent wheels more than most people have an appetite for. In Zig, you will do this for most things. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ▲ | Zambyte 5 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
Zig is easier to get up and running with. Rust is easier to land a job with. Rust is more novel (borrow checker), while Zig is likely more familiar (unique blend of existing ideas). It really depends what you mean by "interesting" :-) | ||||||||||||||||||||||||||||||||
| ▲ | whatshisface 5 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
Zig is not done yet. They make breaking changes with each minor version. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ▲ | schaefer 6 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
only you can decide what you find interesting. | ||||||||||||||||||||||||||||||||
| ▲ | mutkach 6 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
More information is needed to give proper advice: - Do you like filling out the type annotations in Python (making sure linter check passes)? Do you like TYPES in general? - Do you like working with memory (crushing memory bugs, solving leaks)? - Do you prefer imperative or functional approach more? | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ▲ | Vaslo 5 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
My world sounds exactly like yours and I love the astral packages - thanks for asking this | ||||||||||||||||||||||||||||||||
| ▲ | cmrdporcupine 5 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
Increasingly I feel like these two have very different audiences. Disappointingly as a Rust dev, I don't actually see a lot of Rust being used for "systems" development (OS, driver, DB internals, embedded, etc), but increasingly for network services/web services/web stack work, heavily biased towards tokio async driven applications. It's a lot of engineers living further up the stack, leaning on frameworks, and in applications with very large dependency tree footprints. As a % anyways. There's a lot more Rust code out there than Zig. I think Zig has a far more minimalistic thing going on and I like that. I find its type system a lot more primitive, and would miss ADTs/enums, and the borrow checker etc. but I like its overall philosophy better. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ▲ | letmetweakit 6 hours ago | parent | prev [-] | |||||||||||||||||||||||||||||||
I’d choose Rust because of the better safety guarantees and nice tooling. | ||||||||||||||||||||||||||||||||