Declaring Executables and Libraries
Add artifacts to the build graph.
Artifacts to Build
The things you compile are called artifacts: an executable you run, or a library other code links against. You declare them in build.zig. 📦
Add an Executable
Create a runnable program with addExecutable. You give it a name and the root source file that holds main.
const exe = b.addExecutable(.{
.name = "app",
});All lessons in this course
- Anatomy of a build.zig File
- Declaring Executables and Libraries
- Build Steps and zig build run
- Build Options and Flags