⚡ Zig Guide LiveUnofficialbut fully verified
✓ Zig 0.17.0-dev.1503+1f1bee62eOn an older Zig?

How-To

Task-shaped recipes rather than a tour of the language. Databases: SQLite through its C API, the PostgreSQL wire protocol byte by byte, and a Redis RESP round trip. Concurrency with threads, atomics and a producer/consumer queue. SIMD scanning and dot products, zlib compression, binary wire formats, and memory layout. Every recipe is a complete program that CI compiled and ran. Sockets themselves are a section rather than a recipe: see Networking.

  1. Every recipe is a whole program, not a fragment. Copy the page and it builds.
  2. A recipe that will not run in your browser says so and says 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 build on Networking.

24 chapters.

Databases