Skip to content

Support Zig 0.16 alongside 0.14.1 and 0.15.2 - #9

Merged
godofecht merged 2 commits into
mainfrom
zig-0.16
Jul 22, 2026
Merged

Support Zig 0.16 alongside 0.14.1 and 0.15.2#9
godofecht merged 2 commits into
mainfrom
zig-0.16

Conversation

@godofecht

Copy link
Copy Markdown
Owner
Zig Tests
0.14.1 35/35
0.15.2 35/35
0.16.0 35/35

The VST3 plugin still passes pluginval at strictness 10.

Changes

  • Build system: 0.16 moved linkLibrary and linkFramework from Compile onto Module, and linkFramework gained an options argument. Module carries both in 0.14 and 0.15 too, so root_module.linkLibrary and root_module.linkFramework(name, .{}) work everywhere.
  • Allocator: GeneralPurposeAllocator removed; DebugAllocator is its current name and exists since 0.14.1.

The one thing that cannot follow

webview-zig's own build.zig.zon carries a pre-0.16 hash format that 0.16 rejects:

zig-pkg/.../webview-zig-a5eef0b/build.zig.zon:8:21: error: invalid hash: incomplete
    .hash = "122000cad401fdc8175c1c82be38a906f0ea3c8a9e2a85f2670e5c69f224407db464",

Upstream main is still that commit, so nothing here can fix it. The dependency is now marked .lazy = true so it is fetched only on demand, and the GUI example is skipped on 0.16 with the reason stated in the source. Everything else builds and tests there.

🤖 Generated with Claude Code

godofecht and others added 2 commits July 22, 2026 12:31
Build system: 0.16 moved linkLibrary and linkFramework from Compile onto
Module, and linkFramework gained an options argument. Module carries both
in 0.14 and 0.15 as well, so root_module.linkLibrary and
root_module.linkFramework(name, .{}) work everywhere.

Allocator: std.heap.GeneralPurposeAllocator was removed. DebugAllocator
is its current name and exists as far back as 0.14.1.

The webview dependency is the one thing that cannot follow. Its own
build.zig.zon carries a pre-0.16 hash format that 0.16 rejects, and
nothing in this repo can change that. It is now marked lazy so it is
fetched only when something asks for it, and the GUI example is skipped
on 0.16 with the reason stated in the source. Everything else builds and
tests there.

Verified from a clean cache:

    0.14.1   35/35 tests passed
    0.15.2   35/35 tests passed
    0.16.0   35/35 tests passed

The VST3 plugin still passes pluginval at strictness 10.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CI caught what I had not: I verified `zig build test` locally, but the
workflow runs `zig build` first, which compiles examples the test step
never touches. Two of them fail on 0.16:

    examples/danzig-webui/root.zig:15    std.fs.cwd removed
    examples/danzig-gain-standalone/root.zig:28  std.process.argsAlloc removed

Porting them means threading an std.Io.Threaded handle through demo code,
which buys nothing for the library, so they are skipped on 0.16 with the
reason stated in the source. The library, the VST3 plugin and the whole
test suite build there.

Verified with the full CI sequence, `zig build` followed by
`zig build test`, on all three from a clean cache:

    0.14.1   build ok, 35/35
    0.15.2   build ok, 35/35
    0.16.0   build ok, 35/35

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@godofecht
godofecht merged commit 1ce39db into main Jul 22, 2026
3 checks passed
@godofecht
godofecht deleted the zig-0.16 branch July 24, 2026 23:25
godofecht added a commit that referenced this pull request Jul 29, 2026
Support Zig 0.16 alongside 0.14.1 and 0.15.2
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