| Section | Title |
|---|---|
| 1 | Introduction to build.zig |
| 2 | Creating Build Steps |
| 3 | Adding Dependencies |
| 4 | Build Options |
| 5 | Cross Compilation |
| 6 | Static and Dynamic Linking |
| 7 | Release Modes |
| 8 | Running Tests |
| 9 | Installing Binaries |
| 10 | Packaging Applications |
| 11 | Build System Changes in Zig 0.16 |
Introduction to `build.zig`Zig has a built-in build system.
Creating Build StepsA Zig build is made from steps.
Adding DependenciesA Zig project can depend on other Zig packages.
Build OptionsA build option is a value passed from the command line into build.zig.
Cross CompilationCross compilation means building a program for a different machine than the one you are using.
Static and Dynamic LinkingLinking is the step where the compiler connects your program with the code it depends on.
Release ModesZig can build the same program in different optimization modes.
Running TestsZig has built-in support for tests.
Installing BinariesA build does not only compile files. It can also install the results into a predictable output directory.
Packaging ApplicationsPackaging means preparing your program so another person can download it, install it, and run it.
Build System Changes in Zig 0.16Zig changes quickly before 1.0. That includes the build system.