Zook, a book for the Zig programming language

This book is intended to be a gentle introduction to the Zig programming language.

What is Zig?

Quoting from the official website -

Zig is a general-purpose programming language and toolchain for maintaining robust, optimal and reusable software.

Some of its features are -

  • No hidden control flow
  • No hidden memory allocations
  • No preprocessor, no macros

It takes a novel approach to compile time metaprogramming through comptime which allows us write code that runs at compile time in virtually the same way as regular code.

It also acts toolchain for compiling C/C++ projects. The Zig executable allows us to compile existing codebases without changing anything.

License

© Crispy Strawberry. All rights reserved.
No part of this book may be copied in any format without written permission of the author.

All code samples taken from other projects are owned by their respective copyright owners.
The code samples owned by me in this book are licensed under CC0 1.0 Universal license.

Credits

All the credit goes to me and myself.

Personal Notes

According to someone, zook means arse in morrocan. I have not independently verified this claim but left it as an exercise to the reader.