Skip to content

Releases: pedropark99/zig-book

v1.7.0

01 May 01:14
219d984

Choose a tag to compare

v1.7.0

In this release we essentially updated the book to the latest stable release of Zig (0.16).

Not only that, the current version of the book also compiles now successfully in Windows. This was not previously possible because the previous versions of the book tried to use resources from the OS that were available only at runtime in Windows. So, this is a big win for the community, now that the book can be compiled in a different OS.

What's Changed

New Contributors

Full Changelog: v1.6.0...v1.7.0

v1.6.0

01 Mar 03:11
ec9d2ef

Choose a tag to compare

Main objective

This release adds a big refactoring to the book. The main objective of this update is to bring the book up-to-date with the latest master version (0.16) of the Zig compiler. So, basically, with this release, all examples in the book and the ZigExamples should compile successfully with the latest (0.16) version of the Zig compiler.

The changes includes:

  • alter many of the code examples exposed across the book to fit the latest changes in the std.Io type;
  • alter many code examples that performs filesystem operations, since the File and Dir types were moved to std.Io module, which altered many function calls;
  • remove the "Important note for Windows users" section from the first chapter of the book (with the new IO API in Zig, this problem became irrelevant);
  • remove the "Thread pools" section from Chapter 16, mainly because the default/standard implementation of Thread pools offered by the Zig Standard Library was removed at 0.16.

Specific Zig compiler version used to compile the book: 0.16.0-dev.2676+4e2cec265

New Contributors

Full Changelog: v1.5.1...v1.6.0

v1.5.1

28 Nov 13:57
1495fc8

Choose a tag to compare

In this release we've added a build script (build.zig) to the ZigExamples folder. With this build script you can quickly compile all Zig modules (more specifically, the ones that are meant to be successfully compiled) written inside the ZigExamples subfolders. To run this script, do these steps:

$ cd ZigExamples
$ zig build

Is important to emphasize that not all Zig modules written inside the ZigExamples subfolder are included into this build script. Specially because not all of these Zig modules are meant to be "compileable". Some of them, are examples of "broken programs" (kinda Ziglings-style).

The main objective of this build script is to be a second "weapon", or, a second strategy that we can use to determine if the current code examples exposed in the book can be successfully compiled by the latest version of the Zig compiler. In more details, sometimes inside the book, I expose some code snippets that are not "self-contained", meaning that, they need some extra code around them to actually form a valid Zig program. I mostly do that in the book for brevity purposes (is unnecessary to expose the same code multiple times to the reader). Because of that, these code snippets that are not "self-contained" are usually not compiled when we build the book. Since we don't actively compile them, we don't get an active and frequent status/feedback on whether they are still valid (or not) snippets of Zig code, on the latest version of the compiler. As consequence, they can be easily overlooked in the book's updates process.

Therefore, this build script can help us on solving this issue.

v1.5.0

21 Nov 23:22
d290bb0

Choose a tag to compare

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.Step and std.Build.Compile were 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 io argument 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 io argument 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.net module was completed removed in favor of std.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.zig to root of ZigExamples folder. 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 on ZigExamples will 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.

v1.4.0

29 Aug 03:22
84dff1d

Choose a tag to compare

This release brings a big update to the book. Most of the updates were in code examples, more specifically, to fit them into the new Writer and Reader interface that was introduced in Zig 0.15.

What's Changed

New Contributors

Full Changelog: v1.3.6...v1.4.0

v1.3.6

28 May 20:51
5da9373

Choose a tag to compare

Some news

After a request from the community, I've decided to add an EPUB option on Leanpub 🥳🍾🥂🎉🎉🎉 . In other words, you can now buy an EPUB version of the book on Leanpub if you prefer.

Also, I've decided to add a Nix Flake file to the project. Now, you can easily build the book by using this Nix Flake. The instructions are in the README. This Nix Flake file was highly inspired in a Nix Flake developed in a fork of the project by @bengtfrost.

What's Changed

  • Add a Nix Flake for reproducible development environment by @pedropark99 in #166
  • Some small fixes on Chapter 1 by @pedropark99 in #164
  • The latest version of the Zig compiler changed the Linked List API, so, we have updated the sections on Chapter 11 to reflect this change by @pedropark99 in #168
  • Some updates on README.md were added @pedropark99 in #169
  • Add a quick comparison between the Zig defer and the Go defer by @pedropark99 in #170
  • Add epub format configs by @pedropark99 in #170

Full Changelog: v1.3.5...v1.3.6

v1.3.5

09 Apr 22:57

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.3.1...v1.3.5

v1.3.1

08 Mar 15:26
db534b7

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.3.0...v1.3.1

v1.3.0

16 Feb 21:26
7b056a6

Choose a tag to compare

What's Changed

I have some great news on this release. I decided to follow a suggestion from the community, and now, a PDF version of the book is available to purchase on the Leanpub platform 🥳🎉🎉🎉🎊🍾🥂.

https://leanpub.com/introductiontozigaproject-basedbook

Now, let's talk about the actual improvements that we had on the book from last release:

  • A code example in the Pointers chapter was changed to have better compatibility with older versions of Zig, by @pedropark99 in #124
  • A typo on Chapter 1 was fixed by @maarteNNNN in #131
  • An unnecessary swear word was removed from chapter 4 by @Raphexion in #130
  • Links to the PDF version of the book on Leanpub were added to the project by @pedropark99 in #132

New Contributors

We also had some new contributors in the project!

Full Changelog: v1.2.6...v1.3.0

v1.2.6

09 Feb 14:29

Choose a tag to compare

What's Changed

New Contributors

We have some new contributors!!! 🥳🎉🎊🍾

Full Changelog: v1.2.5...v1.2.6