Zig Build System

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.

  • Looks like people behind Zig decided to drop support for macOS Catalina, OS released just 3 years ago. So it is not possible to compile Zig for it. It is ridiculous. https://github.com/ziglang/zig/issues/13313#issuecomment-129...

  • arocc

    A C compiler written in Zig.

  • Zig calls clang to compile C code. This doesn't add a new dependency since Zig already depends on LLVM. In the future when Zig doesn't depend as much on LLVM, there might be a reason to use a C compiler written in Zig (e.g. https://github.com/Vexu/arocc)

  • 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
  • CodeLLDB

    A native debugger extension for VSCode based on LLDB

  • I use VS Code on Linux to debug Zig. Haven't tried the others you mentioned, but it just emits standard DWARF symbols, so I'm guessing if you can debug C/C++ you could probably also do Zig with minimal changes? I just use the lldb VS code plugin[0], which works out of the box for me with no issues.

    https://github.com/vadimcn/codelldb

  • sokol-zig

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

  • IMHO you really need a programming language to describe a build, even when the result looks very declarative.

    E.g. not sure how Meson handles this, but when I have a project with dozens of similar build targets and platform specific compile options, I really want to do the build description in a loop instead of a data tree.

    (for example: https://github.com/floooh/sokol-zig/blob/3f978e58712f9eb029b...)

  • raylib-zig

    Manually tweaked, auto-generated raylib bindings for zig. https://github.com/raysan5/raylib

  • There's also a project that generates automatic bindings for raylib:

    https://github.com/Not-Nik/raylib-zig

  • ffmpeg

    FFmpeg Zig package (by andrewrk)

  • If you want to see a fun example of this build system in action, have a look at my ffmpeg fork which has the build system ported to zig build:

    https://github.com/andrewrk/ffmpeg

    Particularly interesting is the use of nasm as a package dependency, which is executed to compile many assembly files into object files, then linked into the ffmpeg static library.

    I'm using this package in a work-in-progress reboot of Groove Basin (a music player server) in Zig:

    https://github.com/andrewrk/groovebasin/tree/zig-pkg

    Point being that if you want to collaborate on the music player project, you don't need to screw around with a million system dependencies, it's just `zig build` and you're off to the races - no matter whether you are using Windows, macOS, or Linux.

    The zig build system is under heavy construction during this release cycle of Zig. I recommend to check it out at the end of May when Zig 0.11.0 is released, and a few more issues will be smoothed over. Of course, if you want to get your hands dirty and help work on a bleeding-edge build system & package manager, come on over and give master branch a try.

  • Groove Basin

    Music player server with a web-based user interface.

  • If you want to see a fun example of this build system in action, have a look at my ffmpeg fork which has the build system ported to zig build:

    https://github.com/andrewrk/ffmpeg

    Particularly interesting is the use of nasm as a package dependency, which is executed to compile many assembly files into object files, then linked into the ffmpeg static library.

    I'm using this package in a work-in-progress reboot of Groove Basin (a music player server) in Zig:

    https://github.com/andrewrk/groovebasin/tree/zig-pkg

    Point being that if you want to collaborate on the music player project, you don't need to screw around with a million system dependencies, it's just `zig build` and you're off to the races - no matter whether you are using Windows, macOS, or Linux.

    The zig build system is under heavy construction during this release cycle of Zig. I recommend to check it out at the end of May when Zig 0.11.0 is released, and a few more issues will be smoothed over. Of course, if you want to get your hands dirty and help work on a bleeding-edge build system & package manager, come on over and give master branch a try.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
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