-
Book Overview & Buying
-
Table Of Contents
Systems Programming with Zig
By :
Discussing build systems is usually the driest part of systems programming. This usually includes talking about Makefiles and shell scripts that feel entirely detached from the code we write. Zig changes this dynamic entirely by treating the build process as a Zig program. In this chapter, we explore build.zig, where you define your project's build graph using the same syntax and standard library available to your main application, as well as the less crucial build.zig.zon. We see how this approach allows you to handle complex cross-compilation targets and manage dependencies. This way, Zig empowers you to create reproducible builds that work seamlessly across different operating systems. We also bridge the gap between writing code and shipping it by developing a complete Zig library and enforcing reliability through std.testing.
This chapter covers:
std.fmt