⚡ Zig Guide LiveUnofficialbut fully verified
✓ Zig 0.18.0-dev.624+b7f2c6d8fWhat's newOn an older Zig?Blograylib-zig

How-To

Each recipe does one task, and the recipes are not a tour of the language. The database recipes are SQLite through its C API, the PostgreSQL wire protocol byte by byte, and a Redis RESP round trip. The concurrency recipes use threads, atomics and a producer/consumer queue. Other recipes show SIMD scans and dot products, zlib compression, binary wire formats and memory layout. CI compiled and ran each recipe as a complete program. Sockets have their own section, Networking, and are not a recipe.

  1. Every recipe is a full program, not a fragment. If you copy the program from the page, it builds.
  2. If a recipe cannot run in your browser, the recipe tells you why: sockets, threads, a C library, or a real filesystem.
  3. Wire protocols are smaller than their client libraries suggest. PostgreSQL and RESP are each one file here, and both use the Networking chapters as a base.

24 chapters.

Databases