I guess the difference is zig doesn’t even properly type check a function if you didn’t use it. Whereas rust relies on the linker to remove machine code after that code went through the entire compiler pipeline.

Zig not even type checking some code when compiling felt a bit off but now I just try to make sure all code is at least being smoke tested, so I don’t get random compilation errors down the line