flâneur — a map of the web's best reading

Zig And Rust

matklad.github.io · 2,809 words · saved by 1 readers

This post will be a bit all over the place. Several months ago, I wrote Hard Mode Rust, exploring an allocation-conscious style of programming. In the ensuing discussion, @jamii name-dropped TigerBeetle, a reliable, distributed, fast, and small database written in Zig in a similar style, and, well, I now find myself writing Zig full-time, after more than seven years of Rust. This post is a hand-wavy answer to the why? question. It is emphatically not a balanced and thorough comparison of the two languages. I haven't yet written my 100k lines of Zig to do that. (if you are looking for a more general what the heck is Zig, I can recommend @jamii's post). In fact, this post is going to be less about languages, and more about styles of writing software (but pre-existing knowledge of Rust and Zig would be very helpful). Without further caveats, let's get started.

This post will be a bit all over the place. Several months ago, I wrote Hard Mode Rust , exploring an allocation-conscious style of programming. In the ensuing discussion, @jamii name-dropped TigerBeetle , a reliable, distributed, fast, and small database written in Zig in a similar style, and, well, I now find myself writing Zig full-time, after more than seven years of Rust. This post is a hand-wavy answer to the “why?” question. It is emphatically not a balanced and thorough comparison of the two languages. I haven’t yet written my 100k lines of Zig to do that. (if you are looking for a mor

Explore this link on the map →

related reading