About the book
This is an open book that provides an introduction to the Zig programming language, which is a new general-purpose, and low-level programming language for building robust and optimal software.
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.
As you work through the book, you will learn:
- The syntax of the language, and how it compares to C, C++ and Rust.
- Data structures, memory allocators, filesystem and I/O.
- Optionals as a new paradigm to handle nullability.
- How to test and debug a Zig application.
- Errors as values, and how to handle them.
- How to build C and Zig code with the build system that is embedded into the language.
- Zig interoperability with C.
- Parallelism with threads and SIMD.
- And more.
License
This book is licensed under the CC-BY 4.0 Creative Commons Attribution 4.0 International Public License , Copyright © 2024 Pedro Duarte Faria.
Book citation
You can use the following BibTex entry to cite this book:
@book{pedro2024,
author = {Pedro Duarte Faria},
title = {Introduction to Zig},
subtitle = {a project-based book},
month = {October},
edition = {1},
year = {2024},
address = {Belo Horizonte},
url = {https://github.com/pedropark99/zig-book}
}