Skip to main content
Version: Zig 0.12.0

Build Modes

Zig provides four build modes, with debug being the default as it produces the shortest compile times.

Runtime SafetyOptimizations
ReleaseSafeYesYes, Speed
ReleaseSmallNoYes, Size
ReleaseFastNoYes, Speed

These may be used with zig run and zig test with the arguments -O ReleaseSafe, -O ReleaseSmall, and -O ReleaseFast.

Users are recommended to develop their software with runtime safety enabled, despite its small speed disadvantage.