⚡ Zig Guide LiveUnofficialbut fully verified
✓ Zig 0.18.0-dev.624+b7f2c6d8fWhat's newOn an older Zig?Blograylib-zig

Build System

build.zig is a Zig program, not a config file. These chapters show the four build modes and the trade-off of each mode. They also show how to cross-compile to any target with no toolchain to install, how to fetch dependencies through build.zig.zon, and how to make docs from doc comments.

  1. build.zig is a Zig program. If you want a conditional or a loop in your build, write one.
  2. A cross-compile installs nothing. The target is an argument, and the same command makes a binary for a machine that you do not own.
  3. The four build modes are a real choice. ReleaseSafe keeps the overflow and bounds checks. Those checks catch the bugs that this guide shows you many times.

6 chapters.