Zig's memory safety has nothing in common with Rust. I'd even say, it mostly has barely more than C. It gets reliability from proper error handling.
It has a very weird feeling complaining about build.rs when any semi-serious Zig project comes with a build.zig that's always more complex than any build.rs.