Skip to content

Support Zig 0.15 alongside 0.14.1 - #6

Merged
godofecht merged 1 commit into
mainfrom
zig-0.15
Jul 21, 2026
Merged

Support Zig 0.15 alongside 0.14.1#6
godofecht merged 1 commit into
mainfrom
zig-0.15

Conversation

@godofecht

Copy link
Copy Markdown
Owner

Four separate 0.15 changes, all fixable with spellings both versions accept. So this widens support rather than cutting over.

Build system

addStaticLibrary/addSharedLibrary fold into addLibrary with an explicit .linkage, and target/optimize move onto a module passed as .root_module.

Calling convention (52 sites)

error: union 'builtin.CallingConvention' has no member named 'C'

callconv(.C)callconv(.c) across src/vst3.zig and the gain example. 0.14.1 already accepted the lowercase form.

std.Io rework (writergate)

error: no field or member function named 'readAll' in 'net.Stream'

Replaced with a single read, which is the correct semantic here anyway: readAll blocks until the 8 KB buffer fills or the peer closes, so a keep-alive HTTP client would hang. The removal exposed a latent bug.

ArrayList

0.15 made ArrayList unmanaged by default and dropped .init(allocator). ArrayListUnmanaged names the same type in both, so the allocator is passed per call instead.

Dependency

The webview pin used the removed build API, so it blocked 0.15 regardless of our own code. Bumped to a5eef0b, which uses the new one. That in turn renamed WindowSizeHint.Fixed to .fixed.

Verification

From a clean cache, on both toolchains:

Zig Build Tests VST3
0.14.1 24/24 35/35
0.15.2 24/24 35/35 fat binary: x86_64 arm64

CI runs a matrix over both so the compatibility stays verified.

Also corrects two stale README claims: the Zig version requirement (said 0.12.0+), and a License section pointing at a project root that no longer holds the license.

🤖 Generated with Claude Code

Four separate 0.15 changes, all fixable with spellings that both
versions accept, so this widens support rather than cutting over.

Build system:
  - addStaticLibrary/addSharedLibrary fold into addLibrary with an
    explicit .linkage, and target/optimize move onto a module passed as
    .root_module.

Calling convention (52 sites in src/vst3.zig and the gain example):
  - callconv(.C) -> callconv(.c). The CallingConvention union was
    reworked; 0.14.1 already accepted the lowercase form.

std.Io rework:
  - net.Stream.readAll was removed. Replaced with a single read, which
    is the correct semantic here anyway: readAll blocks until the 8 KB
    buffer fills or the peer closes, so a keep-alive HTTP client would
    hang.

ArrayList:
  - 0.15 made ArrayList unmanaged by default and dropped
    .init(allocator). ArrayListUnmanaged names the same type in both, so
    the allocator is passed per call instead.

The webview dependency also had to move: its pinned commit used the
removed build API. Bumped to a5eef0b, which uses the new one. That in
turn renamed WindowSizeHint.Fixed to .fixed.

Verified on both toolchains from a clean cache:

  0.14.1   24/24 build steps, 35/35 tests
  0.15.2   24/24 build steps, 35/35 tests, vst3 bundle still fat
           (x86_64 arm64)

CI runs a matrix over both. Also corrects two stale README claims: the
Zig version requirement, and a License section pointing at a project
root that no longer holds the license.

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