4 ms·
Rust is what most *should* use for system-level programming and/or overall programming, if possible. Rust is safer, better overall + ergonomics, ecosystem, etc
by mamcx 3y ago
Rust is what most *should* use for system-level programming and/or overall programming, if possible.
Rust is safer, better overall + ergonomics, ecosystem, etc.
However, Zig have some nice properties:
- Is easier to do bit/memory wrangling in Zig than in Rust
- Is FAR easier to cross-compile. To the point that for example I use Zig to compile my Rust project for musl
- Is MUCH faster to compile
- Is far "smaller" that is nice in constrained situation (not just "environments", for example, you can use zig for when you will use gcc/llvm to compile some small c file)
Zig is a very good match if the scope of the project is relatively small. Rust shine much more when is more big or you need to work for a team of people.
Also, if you plan to make a library that will be used by others, better to use a safer lang.
I don't see both as competitors. They are excellent complements, and my dream is to Zig to replace C and Rust/ada/pascal to replace C/C++.
P.D: A probably good match is to make some low-level thing in Zig (where before was C) and FFI it in Rust.