Skip to content

Releases: pedropark99/zig-book

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

v1.2.5

31 Jan 01:48

Choose a tag to compare

What's Changed

This release add several small fixes across the book. The most important fix made in this release is related to the build.zig.zon file. As reported by @Zorgatone , my previous explanation of this file was completely wrong, and this was solved in this release at #115 .

  • First, a fix over a code example that was broken in the Build system chapter by @pedropark99 in #103
  • Then, a PR was added to fix several issues that were reported by the community on the last month, by @pedropark99 in #115
  • A devcontainer configuration file was added to the project by @santif in #101
  • Small fixes were made in Chapter 1 by @HamzaWahed in #114
  • And also, some more fixes and suggestions were applied by @mwilbur in #112
  • A small fix by @Zorgatone in #107

New Contributors

We also had several new contributors in this release, which is awesome 🥳🎉🎊🍾

Full Changelog: v1.2.0...v1.2.5

v1.2.0

04 Dec 22:54
f0d14ee

Choose a tag to compare

The main improvement that this release brings is a complete refactoring of the Zig engine that is used by the book to compile and run every Zig code example exposed across the book.

This refactoring actually brings some important improvements for the Zig engine, which are:

  • greatly improve readability and code organization in the Zig engine.
  • reduce the risk for bugs.
  • adds documentation to the Zig engine source code.
  • adds a much better error report. In other words, now is much better to understand the error messages that are generated during the compilation process of the book.

What's Changed

  • Big refactoring on the Zig engine used by the book by @pedropark99 in #98
  • Fix issue on while loop reported at #97
  • Fix duplicated results from stderr by @pedropark99 in #99

Full Changelog: v1.1.4...v1.2.0