An open, technical and introductory book for the Zig programming language

I’m thrilled to announce the launch of the first edition of the book “Introduction to Zig: a project-based book” :partying_face::tada::tada::tada:. This is an open source, technical and introductory book for the Zig programming language.

This book is designed for both beginners and experienced developers. It explores the exciting world of Zig through small and simple projects (in a similar style to the famous “Python Crash Course” book from Eric Matthes). Some of these projects are: a Base64 encoder/decoder, a HTTP Server and an image filter.

Link to the project: GitHub - pedropark99/zig-book: An open, technical and introductory book for the Zig programming language

This book is open for anyone that wants to read it. But, if you like this project, and you want to support it, you can buy an eBook or a physical copy of the book on Amazon: Amazon.com: Introduction to Zig: a project-based book eBook : Duarte Faria, Pedro: Kindle Store

65 Likes

Just bought a copy thanks for your work :slight_smile: can’t wait to receive it.

1 Like

added to the list

2 Likes

Just received your book, it’s a great read, and I’m very happy with the quality, everything is well explained, it’s a fantastic resource for quickly getting a reference about something.

4 Likes

In “12.2.1 A generic function” section:

Without a generic function, I would have to write a different max() function for each one of the data types that I wanted to use. This generic function provides a very useful shortcut for us

I just had a think - maybe, it should be noted here that Zig compiler actually generates different functions for each T that was used in a program with max(). In other words, comptime T: type in a function signature is a way of automatic boilerplate code generation.

4 Likes

Federal University of Ouro Preto - Brazil!
:melting_face:

2 Likes

This is fantastic, thank you!

1 Like

I love books that I can hold in my hand. This allows me to step away from the screen, and study Zig in a different way.

Just ordered the book yesterday, happy to support your efforts!

2 Likes

I really like your book. I picked up a copy a week ago and I’m almost finished. I started to rewrite my programming language in Zig, and I actually got it figured out because of your book.

I’m very appreciative of the text that clearly explains things, and even takes a little extra time to cover topics fully.

Thanks.

3 Likes

I read your book “cover to cover” on the web when I was getting started with zig a few months ago and bought a hard copy on amazon a week or two ago just to have it on my shelf and of course to help you out. Great work man, and thanks for helping expand the Zig community!

2 Likes

I’m new to Zig, just read your book. It helped me to get a better understanding of how to write Zig code, and I’m sure I’ll read it again. Thanks!

1 Like