Learning Zig

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

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

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

  • Does anyone know why Zig isn't up to date on homebrew? I tried pulling a very simple SDL2 project off github and building it on my macbook M1 and hit https://github.com/ziglang/zig/issues/12069.

    Homebrew has 10.1 and no option for --HEAD, so I don't know if it's a version issue or what. If anyone has recommendations or an example scaffold that shows how I can build a SDL2 zig project on a M1 with SDL2 installed via homebrew that would be cool, I don't have the mental energy to sort out what is going on.

    Rust-SDL2 doesn't seem to work either, so maybe I'm just forever cursed to use C++.

  • Rustlings

    :crab: Small exercises to get you used to reading and writing Rust code!

  • Rust also has something similar which is where I believe Zig drew inspiration from as well: https://github.com/rust-lang/rustlings

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

    Algebra for Zig

  • > comptime doesn't allow you to create domain specific macros

    Sure it does!

    Zig's string format function is written using comptime. It parses the format string and validates the arguments at compile time. See https://github.com/ziglang/zig/blob/master/lib/std/fmt.zig

    I also toyed around with turning a math equation dsl into compiled statements at https://github.com/Laremere/alg I got matrix math working so, eg, if you multiply a 1by2 matrix by a 2by1 matrix, it returns a matrix which is typed to 2x2.

  • ZigPong

    GUI Pong written in Zig, using Raylib

  • I ended up doing a GitHub search on "SDL", with language specified as "Zig", and sorted in reverse chronological order and found https://github.com/Liam-Malone/ZigPong, which ran without issues by running "zig build run" in the repository directory.

  • zvm

    zvm (Zig Version Manager) lets you easily install/upgrade between different versions of Zig.

  • I tried out zvm (Zig Version Manger) on my Mac laptop earlier today, seems to work even if it’s not super polished:

    https://github.com/tristanisham/zvm

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