-
Book Overview & Buying
-
Table Of Contents
Systems Programming with Zig
By :
In the tradition of classical systems programming, we created many self-contained programs. By ensuring that the logic, the data structures, and the system calls are all contained within a single, readable source file, we provide a complete map of the program's intent and execution. This is an invaluable way to learn because there are no hidden configuration files, opaque third-party dependencies, or external frameworks to distract from the core mission: communicating with the operating system. Furthermore, self-contained code ensures reproducibility and longevity. A program that relies only on its own source and the standard library is far more likely to compile and run correctly years from now, even if the Zig programming language introduces breaking changes, than one tethered to a shifting ecosystem of external packages.
So, in this chapter, we have explored how Zig interacts with the filesystem. By constructing the ztree utility, we navigated the complexities...