Build Mode
-Drelease-safe=[bool] optimizations on and safety on
-Drelease-small=[bool] size optimizations on and safety off
- Safety checks enabled
- Slow runtime performance
- Large binary size
- No reproducible build requirement
- Fast runtime performance
- Safety checks disabled
- Slow compilation speed
- Large binary size
- Reproducible build
- Medium runtime performance
- Slow compilation speed
- Large binary size
- Reproducible build
$ zig build-exe example.zig --release-small
- Medium runtime performance
- Safety checks disabled
- Slow compilation speed
- Small binary size
- Reproducible build