Zig and WASM

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

Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. liwords

    A site that allows people to play a crossword board game against each other

    We use WASM to provide in-browser Scrabble-like analysis at https://woogles.io at the end of games. The original analyzer was built in Rust and the speed is close to native.

  2. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  3. book

    The Rust and WebAssembly Book (by rustwasm)

    If you're targeting browsers then the Rust WASM book goes over using the wasm32-unknown target and wasm_bindgen to auto-generate the JS glue

    https://rustwasm.github.io/docs/book/

    If you're targeting some WASI-based platform then it's more straightforward, as there's no need to generate glue code. CF have a quick example

    https://blog.cloudflare.com/announcing-wasi-on-workers/

  4. pacman.zig

    Simple Pacman clone written in Zig.

    For a somewhat more complete example which runs in browsers, check out my little pacman.zig toy project [0]. This is cheating a bit by using Emscripten toolchain as 'sysroot' (needed for the Emscripten headers), and the Emscripten linker to create the html+js+wasm output file, but the actual code is all compiled with the Zig compiler.

    The interesting part is that the platform abstraction is provided by the sokol headers [1], with auto-generated Zig bindings [2]. It's interesting because the C headers use "Emscripten magic" (mainly embedding Javascript snippets in the C sources via the EM_JS() macro), and the Zig compiler is able to compile this (when it has access to the Emscripten headers).

    It would be nice if the "Emscripten platform" could get the same type of cross-compilation support as the desktop platforms eventually, but apart from bundling the Emscripten headers, this would also require to implement some of the "Emscripten magic" in the linker step.

    Maybe projects like WaJIC can help with this (this basically implements the "Emscripten magic" of embedding Javascript snippets in C/C++ source code, but without Emscripten (only the wasm-opt tool is needed AFAIK).

    Anyway... it's a lot of fun to tinker around with this stuff in Zig, and watch how it's all taking shape :)

    [0] https://github.com/floooh/pacman.zig

  5. sokol

    minimal cross-platform standalone C headers

  6. sokol-zig

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

  7. wajic

    WebAssembly JavaScript Interface Creator

  8. zig-wasm-test

    A minimal Web Assembly example using Zig's build system.

    Wow, this just straight rips off my (not very great) example I've been maintaining for a while:

    https://github.com/meheleventyone/zig-wasm-test

    Thanks for the credit yurivish! :(

  9. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  10. minimal-zig-wasm-canvas

    A minimal example showing how HTML5's canvas, wasm memory and zig can interact.

  11. Dodgeballz

    A mini game using Zig, WASM and JS

  12. zig-wefx

    WEFX is a simple graphics drawing package using Zig, WASM, and an HTML canvas.

  13. zig-wasm-logger

    A simple implementation of console.log() in Zig + JS + Wasm

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

  • Ask HN: Languages Designed for WASM?

    13 projects | news.ycombinator.com | 29 Jun 2025
  • IoT Architectures Under Pressure: hosting a portable firmware (Part 3)

    4 projects | dev.to | 16 May 2025
  • DOOM...*rendered* using a single DIV and CSS! 🤯🔫💥

    1 project | dev.to | 10 May 2025
  • Hello world from a WASM module in a static binary

    5 projects | dev.to | 22 Feb 2025
  • WASM Will Replace Containers

    21 projects | news.ycombinator.com | 11 Feb 2025

Did you know that Zig is
the 19th most popular programming language
based on number of references?