0PricingLogin
Zig Academy · Lesson

Debug, ReleaseSafe, ReleaseFast

Choose an optimization and safety mode.

Build Modes Decide the Trade-off

Zig offers four build modes that tune the balance between safety, speed, and size. You pick one with a single flag when you compile.

Debug Is the Default

If you choose nothing, Zig uses Debug. It compiles fast and keeps every safety check on, so bugs are caught loudly while you develop.

All lessons in this course

  1. zig run vs zig build-exe
  2. Debug, ReleaseSafe, ReleaseFast
  3. Reading Compiler Errors
  4. zig fmt: Format Your Code
← Back to Zig Academy