Package Management Moves to Build System
Andrew Kelley moved all package management subcommands (zig build, zig fetch, zig init, zig libc) from the compiler executable into the maker process — the separate process that runs the build system. The compiler binary now only handles compilation; package fetching, HTTP client, TLS, crypto, git protocol, archive decompression (xz, gzip, zstd, flate, zip), and build.zig.zon parsing are all shipped in source form and executed in the maker process.
Consequences:
- Compiler binary shrinks 4%: from 14.1 MiB to 13.5 MiB (ReleaseSmall, no LLVM).
- Package management code can be patched without rebuilding the compiler.
- The
makerprocess runs in ReleaseSafe mode, enabling safety checks during networking. - Crypto can use rare CPU instructions (AOT + JIT-like benefits).
Process Tree Restructuring
Originally:
zig build (compiler + package manager)
└─ builder (user's build.zig + build system)
After earlier process separation:
zig build (compiler + package manager)
├─ configurer (user's build.zig logic)
└─ maker (build system)
Now:
zig build (compiler only)
└─ maker (build system + package manager)
└─ configurer (user's build.zig logic)
This change was motivated by the need for a long-running zig build --watch process. When build.zig changes, the configurer must rerun. In the old tree, maker had to exit so the parent could rerun package management. Now maker is the parent of configurer, so it can respawn configurer without exiting itself. This avoids awkward disconnects in the upcoming build server protocol.
Breaking Changes
--maker-optflag replaced byZIG_DEBUG_MAKERenvironment variable.--zig-lib-dirflag replaced byZIG_LIB_DIRenvironment variable.
Impact on ZLS and Zig 0.17.0
The immediate goal is to unblock the Zig Language Server (ZLS) via a build server protocol MVP. Blockers remaining for Zig 0.17.0:
- Build server protocol MVP
- Path dependencies for the build script itself
zig build --watchdetecting build script changes and rerunning- Different cwd causing build script cache misses
Kelley expects to wrap these up by early August after conference talks in July. Contributions welcome.
Code Example: Configuring the Build Server
(No direct code snippet in source, but the change enables a future workflow where ZLS can query the build server for configuration without restarting.)
What This Means for Zig Developers
- Smaller compiler download.
- Package management bugs can be fixed by updating source files, not waiting for a compiler release.
- Safer networking due to ReleaseSafe mode in
maker. - Future
zig build --watchwill be more robust and integrate better with editor tooling.
Bottom Line
This is an architectural cleanup that makes Zig's build system more maintainable and paves the way for better editor support. If you've been frustrated by ZLS not understanding your build configuration, this is the first step toward fixing that.


