This release represents a big update to the book. The main objective of this release is to update all code examples in the book to Zig 0.16. This includes:
- update Chapter 9 (Build System) and Chapter 15 (Image filter project) to include the latest changes in the Zig build system. Many methods from
std.Build.Stepandstd.Build.Compilewere moved to other places. - update
_char_index()method on the Base64 project to fix issue reported at #185. - fix issue reported at #191 .
- with the introduction of the new
ioargument in many I/O related functions in the Zig Standard Library, this PR also updates many code examples scattered across the book to account for this new argument. - add a new section in Chapter 13 (Filesystem and I/O) to describe this new
ioargument in the Zig I/O interface. - many code examples from chapter 13 were not being actively compiled during the book compilation process. This PR also fixes this.
- with the new I/O interface, the
std.netmodule was completed removed in favor ofstd.Io.net, and this changed completely how network operations are made in Zig. This affected mainly the HTTP server project. So, this PR also updates Chapter 7 to account for this big update. - the new I/O interface changed how "sleep operations" are performed. So, this PR also updates Chapter 16 to include these changes.
- add a
build.zigto root ofZigExamplesfolder. This build script is not ready yet, so, it will definitely fail on most machines. There is still much work to be done on it. Although most of the code examples exposed across the book are being actively compiled by the Zig compiler everytime that we build the book, not all code examples exposed in the book are "self-contained", and some of them are intentionally designed to fail. So, building this build script onZigExampleswill be, in the future, an "extra/complementary test" to the build process of the book, to test if all code examples are compatible with the latest version of Zig.