Zig cookbook is a collection of simple Zig programs that demonstrate good practices to accomplish common programming tasks.
- Main branch tracks Zig 0.14.0 and master, and are tested on Linux and macOS via GitHub actions.
- Earlier Zig support could be found in other branches.
The website is generated by zine-ssg, a static site generator for Zig. zine
will start a server at http://localhost:1990
for preview.
Each recipe is accompanied by an illustrative example named after its corresponding sequence number. These examples can be executed using the command zig build run-{chapter-num}-{sequence-num}
, or zig build run-all
to execute all.
Some recipes may depend on system libraries
- Use
make install-deps
to install client libraries, anddocker-compose up -d
to start required databases.
This cookbook is a work in progress, and we welcome contributions from the community. If you have a favorite recipe that you'd like to share, please submit a pull request.
Create corresponding recipe in the language folder, localize it, and submit a pull request.
The initial version of the Zig Cookbook was inspired by several other similar projects. We would like to thank the following projects, thanks for their awesome work.
The current version of the Zig Cookbook is based on zine-ssg, thanks for their awesome work.
<a href="https://star-history.com/#zigcc/zig-cookbook&Date">
<img src="https://api.star-history.com/svg?repos=zigcc/zig-cookbook&type=Date" alt="Star History">
</a>
The markdown files are licensed under CC BY-NC-ND 4.0 DEED, and zig files are under MIT.