Skip to content

fix(build): compile against stable Zig 0.16.0#14

Open
TanGentleman wants to merge 1 commit into
zig-wasm:mainfrom
TanGentleman:fix/zig-0.16.0-stable
Open

fix(build): compile against stable Zig 0.16.0#14
TanGentleman wants to merge 1 commit into
zig-wasm:mainfrom
TanGentleman:fix/zig-0.16.0-stable

Conversation

@TanGentleman
Copy link
Copy Markdown

@TanGentleman TanGentleman commented May 9, 2026

Problem

zig build currently fails on every released Zig toolchain:

  • minimum_zig_version in build.zig.zon is pinned to 0.16.0-dev.205+4c0127566, a dev tarball that is no longer hosted on ziglang.org.

  • docs/Walk.zig switches on Ast.Node.Tag.asm_legacy, which was removed before the 0.16.0 release. Building with stable 0.16.0 errors out:

    docs/Walk.zig:794:10: error: enum 'zig.Ast.Node.Tag' has no member named 'asm_legacy'
            .asm_legacy => {},
    

This is the same class of breakage as #5 / #6, just one Zig cycle later.

Fix

  1. Bump minimum_zig_version to the released 0.16.0.
  2. Drop the .asm_legacy => {}, arm. The arm was a no-op, and the surrounding switch is exhaustive — keeping it is a hard compile error on any Zig that no longer carries the enum value.

Verification

$ zig version
0.16.0
$ zig build
$ ls zig-out/main.wasm
zig-out/main.wasm

Built main.wasm exercised end-to-end via the downstream zigpeek CLI (search_std_lib, get_std_lib_item, builtin lookups) — no behavior change.

Notes

  • I have been learning Zig, and had a really great time working on the zigpeek project built off the work in this repo! Cheers :D

The previous `minimum_zig_version` pinned a 0.16.0-dev tarball that is no
longer hosted on ziglang.org, and `docs/Walk.zig` switched on
`Ast.Node.Tag.asm_legacy` which was removed before the stable 0.16.0
release. As a result `zig build` failed on every released toolchain:

    docs/Walk.zig:794:10: error: enum 'zig.Ast.Node.Tag' has no member named 'asm_legacy'
            .asm_legacy => {},

Bump `minimum_zig_version` to the released `0.16.0` and drop the no-op
`.asm_legacy` arm so the project builds cleanly on stable Zig.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant