Zig cookbook: collection of simple Zig programs that demonstrate good practices

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • zig

    General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

  • Zig currently doesn't allow chained designators and also doesn't allow to partially initialize arrays and fill up the rest of the array with default values.

    E.g. the closest Zig equivalent to this C99 code:

    https://github.com/floooh/sokol-samples/blob/b3bc55c4411fa03...

    ...is this:

    https://github.com/floooh/sokol-zig/blob/a4b3c287fadd153a504...

    ...note how part of the initialization had to be moved out into "code".

    There's a ticket about this here, but it's currently not high-priority:

    https://github.com/ziglang/zig/issues/6068

  • zig-cookbook

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

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • sokol-samples

    Sample code for https://github.com/floooh/sokol

  • Zig currently doesn't allow chained designators and also doesn't allow to partially initialize arrays and fill up the rest of the array with default values.

    E.g. the closest Zig equivalent to this C99 code:

    https://github.com/floooh/sokol-samples/blob/b3bc55c4411fa03...

    ...is this:

    https://github.com/floooh/sokol-zig/blob/a4b3c287fadd153a504...

    ...note how part of the initialization had to be moved out into "code".

    There's a ticket about this here, but it's currently not high-priority:

    https://github.com/ziglang/zig/issues/6068

  • sokol-zig

    Zig bindings for the sokol headers (https://github.com/floooh/sokol)

  • Zig currently doesn't allow chained designators and also doesn't allow to partially initialize arrays and fill up the rest of the array with default values.

    E.g. the closest Zig equivalent to this C99 code:

    https://github.com/floooh/sokol-samples/blob/b3bc55c4411fa03...

    ...is this:

    https://github.com/floooh/sokol-zig/blob/a4b3c287fadd153a504...

    ...note how part of the initialization had to be moved out into "code".

    There's a ticket about this here, but it's currently not high-priority:

    https://github.com/ziglang/zig/issues/6068

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts