Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zigcc/zig-cookbook

Simple Zig programs that demonstrate good practices to accomplish common programming tasks.
https://github.com/zigcc/zig-cookbook

zig ziglang

Last synced: about 18 hours ago
JSON representation

Simple Zig programs that demonstrate good practices to accomplish common programming tasks.

Awesome Lists containing this project

README

        

# Zig Cookbook

[![](https://img.shields.io/discord/1155469703846834187?label=Chat%20on%20Discord)](https://discord.gg/bAehMGPb2R)
[![](https://img.shields.io/github/stars/zigcc/zig-cookbook?style=square&color=#30a14e)](https://github.com/zigcc/zig-cookbook/stargazers)
[![](https://github.com/zigcc/zig-cookbook/actions/workflows/ci.yml/badge.svg)](https://github.com/zigcc/zig-cookbook/actions/workflows/ci.yml)
[![](https://github.com/zigcc/zig-cookbook/actions/workflows/pages.yml/badge.svg)](https://github.com/zigcc/zig-cookbook/actions/workflows/pages.yml)

[Zig cookbook](https://github.com/zigcc/zig-cookbook) is a collection of simple Zig programs that demonstrate good practices to accomplish common programming tasks.

> - Main branch tracks Zig 0.13.0 and master, and ensured on Linux and macOS via GitHub actions.
> - Zig 0.11.0 support can be found in [here](https://github.com/zigcc/zig-cookbook/tree/0.11.0).

# How to use

[The website](https://cookbook.ziglang.cc/) is generated by [mdbook](https://rust-lang.github.io/mdBook/), `mdbook serve` will start a server at `http://localhost:3000` 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.

> ## Note
> Some recipes may depend on system libraries
> - Use `make install-deps` to install client libraries, and
> - `docker-compose up -d` to start required databases.

# Contributing

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](https://github.com/zigcc/zig-cookbook/pulls).

# Acknowledgment

When working on zig-cookbook, we benefit a lot from several similar projects, thanks for their awesome work.

- [Rust Cookbook](https://github.com/rust-lang-nursery/rust-cookbook)

# Star History

[![Star History Chart](https://api.star-history.com/svg?repos=zigcc/zig-cookbook&type=Date)](https://star-history.com/#zigcc/zig-cookbook&Date)

# License

The markdown files are licensed under [CC BY-NC-ND 4.0 DEED](https://creativecommons.org/licenses/by-nc-nd/4.0/), and zig files are under MIT.