⚡ Zig Guide LiveUnofficialbut fully verified
✓ Zig 0.17.0-dev.1503+1f1bee62eOn an older Zig?

Build System

build.zig is a Zig program, not a config file. These chapters cover the four build modes and what each trades, cross-compiling to any target without a toolchain to install, fetching dependencies through build.zig.zon, and generating docs from doc comments.

  1. build.zig is a Zig program. When you want a conditional or a loop in your build, you write one.
  2. Cross-compiling installs nothing. The target is an argument, and the same command produces a binary for a machine you do not own.
  3. The four build modes are a real choice. ReleaseSafe keeps the overflow and bounds checks that catch the bugs this guide keeps showing you.

6 chapters.