Skip to content

fix: support Zig 0.17 alongside 0.15 and 0.16 - #1

Merged
trvon merged 1 commit into
mainfrom
fix/zig-0.17-compat
Nov 4, 2026
Merged

trvon merged 1 commit into
mainfrom
fix/zig-0.17-compat

Conversation

@trvon

@trvon trvon commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Changes

  • Feature-detect Run.addPassthruArgs() and keep b.args for older Zig versions.
  • Replace removed std.meta.Int with width-matched SIMD mask types.
  • Use @splat(null) for CLI and WASM arrays.
  • Add a SIMD boundary regression and extraction/benchmark argument-forwarding checks.
  • Extend the existing CI matrix to Zig 0.15.2, 0.16.0, and 0.17.0.

No new compatibility module, dependencies, runtime switches, or version-number dispatch.

Validation

Zig Platform Debug ReleaseSafe Native/WASM Run/bench argument forwarding
0.15.2 Linux arm64, isolated Debian container 411/411 411/411 Passed Passed
0.16.0 macOS 27 arm64 411/411 411/411 Passed Passed
0.17.0 macOS 27 arm64 411/411 411/411 Passed Passed

Portable toolchains were SHA-256 checked against the official Zig download index. Formatting and git diff --check passed.

Platform caveat

Zig 0.15.2 cannot link its native build runner on macOS 27 arm64; an empty standalone test reproduces the native linker failure. Targeting macOS 26 fixes a direct test but not the native build runner. The README recommends Zig 0.16.0 or 0.17.0 on that host. No source workaround is added.

Integration

This PR changes the zpdf fork only. The YAMS submodule pin is unchanged. Merge or rebase this PR rather than squash before YAMS pins the resulting commit. Remote CI results are pending.

Feature-detect build argument passthrough and retain the legacy fallback. Use portable array initialization and width-matched SIMD masks without adding a compatibility layer.

Add SIMD boundary coverage, preserve the Zig 0.15.2/0.16.0 CI lanes, add 0.17.0 and verify run/bench argument forwarding. Document the Zig 0.15.2 macOS 27 build-runner limitation.

Validated native/WASM builds, 411 Debug tests, 411 ReleaseSafe tests and argument-forwarding smoke tests on each version: 0.15.2 on Linux arm64; 0.16.0 and 0.17.0 on macOS arm64.
@trvon trvon closed this Oct 17, 2026
@trvon

trvon commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

Superseded by the upstream PR: Lulzx#12. The patch is intended for Lulzx/zpdf main, using trvon:fix/zig-0.17-compat as the head branch.

@trvon trvon reopened this Nov 4, 2026
@trvon
trvon merged commit 8796226 into main Nov 4, 2026
5 checks passed
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