# zigcc/zig-cookbook

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

Repository: https://github.com/zigcc/zig-cookbook
Canonical: https://ross.abutalabs.com/products/zig-cookbook
Homepage: https://cookbook.ziglang.cc/
Language: Zig
License: MIT
License Family: permissive
Topics: zig, ziglang
Last push: 2026-08-16T05:32:08+00:00

## Health v2 (maintenance only)
Score: 71/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 35, longevity 71
- inputs: {"age_days": 997, "days_push": 17, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1173, forks 50 (observed 2026-08-28T04:03:51.787054+00:00)

## What it is
A collection of simple, runnable Zig example programs ('recipes') demonstrating good practices for common programming tasks like file I/O, networking, cryptography, and databases. It is published as a static website generated with zine and tracks recent Zig releases.

## Use cases
- learn how to read files line by line in Zig
- example of hashing a password with Argon2 in Zig
- how to write an HTTP server in Zig
- serialize and deserialize JSON in Zig
- connect to SQLite or Postgres from Zig
- run external commands from a Zig program
- thread pool and concurrency examples in Zig

## When to choose
- you are learning Zig and want tested, idiomatic examples for common tasks
- you need copy-paste recipes for file, network, crypto, or database operations in Zig
- you want examples matched to a specific Zig version via its branches

## When to avoid
- you need comprehensive API documentation rather than task-based examples
- you are working in a language other than Zig
- you need production-ready libraries or frameworks rather than illustrative snippets

## Facets
- artifact type: learning-resource
- maturity: active
- function: developer-tools, documentation, cli, http-server, serialization, cryptography, concurrency, file-system, database-driver
- domain: developer-tools, programming-languages, tutorials, documentation
- platform: cross-platform, cli
- tags: zig, cookbook, recipes, examples, ziglang, static-site, zine, command-line, linux, macos

## Member repositories
- zigcc/zig-cookbook (main) score 71

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:51.787054+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:28:24.929264+00:00, confidence not recorded.
  - readme: https://github.com/zigcc/zig-cookbook (fetched 2026-08-28T04:03:51.787054+00:00, sha 4f53e462007c)
  - homepage: https://cookbook.ziglang.cc/ (fetched 2026-08-29T12:33:40.303692+00:00, sha 7d53e86476ba)
- Data as of 2026-08-30T08:39:29.467469+00:00.
