Updated June 2026 14 hours of live training delivered over 2 days. This course serves two audiences. The first is C and C++ teams who may never write a line of Zig but want The Zig toolchain is two products in one download: a programming language, and a self-contained C/C++ compiler and build system that works on projects containing no Zig code at all. From there the course goes deep on the build system itself: the anatomy of Comprehensive courseware is distributed online at the start of class. All students receive a downloadable MP4 recording of the training. Students will need a free, personal GitHub account to access the courseware and to run the CI labs. Students will need permission to install Zig 0.16 and Visual Studio Code on their computers — the Zig download is the only compiler required, on Windows, macOS, or Linux. If students are unable to configure a local environment, a cloud-based environment can be provided.The Zig Build System and Cross-Compilation
Class Duration
Student Prerequisites
build.zig is taught in classTarget Audience
zig cc as a hermetic, zero-dependency cross-compiler and the Zig build system as a saner alternative to their current toolchain — for cross-compiling to musl targets, pinning glibc versions, or escaping toolchain drift across developer machines and CI. The second is Zig developers who want to master build.zig, the package manager, and multi-target release pipelines.Description
zig cc and zig c++ are zero-dependency, drop-in replacements for cc and c++ that cross-compile out of the box — pass -target aarch64-linux-musl and get a static Linux binary from a macOS laptop, with no sysroots, no Docker images, and no separately installed cross-toolchains. This course teaches that capability systematically: target triples, glibc version selection and musl static linking, and replacing fragile cross-compilation setups with a single tool.build.zig — modules, artifacts, steps, and user options — declarative package management with build.zig.zon, including vendoring C dependencies, and building existing C/C++ projects with Zig instead of (or alongside) CMake and Make. Students wire builds into CI with GitHub Actions, exploit Zig's content-addressed caching, learn to debug builds when something goes wrong, and look ahead to the optimized build-runner work in the in-development 0.17 cycle. Students leave able to cross-compile a real C/C++ or Zig project to multiple targets from one machine and one configuration file.Learning Outcomes
zig cc and zig c++ as drop-in replacements for existing C/C++ compilers, locally and in CI-target triples, selecting CPU features, OS, and ABI deliberatelybuild.zig: modules, artifacts, steps, options, and the dependency graph between thembuild.zig.zon, including hashing, lazy dependencies, and vendoring C librariesTraining Materials
Software Requirements
Training Topics
The Zig Toolchain as Build Infrastructure
zig cc without writing Zigzig cc and zig c++ as Drop-In Compilers
zig cc and zig c++ flag compatibility with cc/clang/gccTargets and Triples
-target with zig cc and target options in build.zigglibc, musl, and libc Selection
-target x86_64-linux-gnu.2.31)Anatomy of build.zig
-D flags, b.option, and conditional buildsaddCSourceFiles, flags, and definesPackage Management with build.zig.zon
build.zig.zon format: name, version, dependencies, pathszig fetch and content hashesbuild.zigBuilding Existing C/C++ Projects
zig cc as the compilerbuild.zig entirelyCaching and Build Performance
CI Integration with GitHub Actions
Comparison with CMake and Make
Debugging Builds
--verbose, --verbose-cc, and --verbose-linkzig build --summary all and reading the step graph