A few differences that I can see:
- At first glance, Rust's `enum` looks safer and more powerful than Zig's `union` + `enum`, while Zig's `union` + `enum` appears more interoperable with C.
- Zig's `comptime` is quite intriguing. In particular, types are (compile-time) values and can be introspected.
- Zig's generics are very different from Rust's generics. No idea how to compare them.
- In particular, Zig's `printf` uses `comptime`, while Rust's `print!` is a macro.
- Zig's Nullable types/Result types look bolted in and much weaker than Rust's userland implementation.
- I don't see closures in Zig.
- I don't see traits in Zig.
- I don't see smart pointers in Zig, and more generally, I have no idea how to deallocate memory in Zig.
- Zig's memory management encourages you to check whether your allocations have succeeded, while Rust's out-of-the-box memory management assumes that allocations always succeed - if you wish to handle OOM, you'll need a "let it fail" approach.
- Zig's alias checker seems to be much more lenient than Rust's.
- I don't see anything on concurrency in Zig's documentation.
- Most of the Zig examples I see seem to fall in the "unsafe" domain of Rust by default. For instance, uninitialized memory or pointer casts seem to be ok in Zig (if explicitly mentioned), while they must be labelled as `unsafe` to be used in Rust.
- According to https://andrewkelley.me/post/unsafe-zig-safer-than-unsafe-ru..., Zig performs some checks that Rust does not perform in an `unsafe` block.
- Zig supports varargs, Rust doesn't (yet).
For the moment, I'll keep coding in Rust, but I'll keep an eye on Zig :)