this post was submitted on 17 Jul 2026
81 points (95.5% liked)

Linux

14351 readers
605 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] mschae@discuss.mschae23.de 12 points 3 days ago (2 children)

As someone who has used both (but not for any serious, large projects), I'd say they target different audiences. First and foremost, Zig is not memory-safe in the way Rust is. On the other hand, Zig is way easier to write than unsafe Rust. Rust comes with a lot of features and libraries, while Zig is an intentionally small language, almost minimalistic (kind of like C, but modern).

There are lots of different tradeoffs being made, so yes, I'll give the boring answer and say they are good for different kinds of projects :)

If it's specifically low level programming (I'm envisioning programs where you need fairly direct control over memory, IO, etc.), you'd probably quickly need a lot of unsafe in Rust, which can quickly get very complicated to use safely. So I'd probably recommend Zig for that purpose.

[–] farooqkz@realbitcoin.cash 2 points 2 days ago

Thank you so much for sharing this. I always wondered about Zig :)

[–] victorz@lemmy.world 5 points 3 days ago

I should've known it's a "it depends" answer. 😆 It's programming languages after all. 😉

Thanks for the insight though, I appreciate it! 🙏