ci(windows): drop static-lib + static-link guards — Plan C-d#69
Merged
ci(windows): drop static-lib + static-link guards — Plan C-d#69
Conversation
`test/c_api/run_static_link_test.sh` now uses `zig cc` in place of system `cc`, which is portable across Mac/Linux/Windows. PIE coverage is preserved on Linux. The Rust static-link sub-test (`cargo build` against the static lib) skips on Windows because `examples/rust/build.rs` still emits `cargo:rustc-link-lib=c|m` and `-Wl,-rpath` — those POSIX-isms are tracked as Plan C-c. The two `if: runner.os != 'Windows'` guards on `Build static library` and `Run static link tests` are dropped accordingly.
Zig's `addLibrary({.linkage = .static})` produces `zwasm.lib` on
Windows (MSVC convention, no `lib` prefix), not `libzwasm.a`. Detect
host OS and pick the right path.
Mac/Linux paths unchanged.
This was referenced Apr 29, 2026
chaploud
added a commit
that referenced
this pull request
Apr 29, 2026
chaploud
added a commit
that referenced
this pull request
Apr 29, 2026
`examples/rust/build.rs` gained a Windows arm: - Dynamic linking copies `zwasm.dll` from `zig-out/bin/` next to the cargo target binary so the OS finds it via the executable directory at runtime. PE has no analogue of `-Wl,-rpath`. - Static linking uses `zwasm.lib` (not `libzwasm.a`) and skips the POSIX-only `-lc` / `-lm` (Windows MSVC auto-links the CRT). The `if: runner.os != 'Windows'` guard on the `Run Rust FFI example (dynamic)` step is dropped accordingly. Plan C-c. Mac/Linux paths unchanged. The static-link Rust sub-test in `test/c_api/run_static_link_test.sh` is still SKIP'd on Windows in PR #69; un-skipping it once both PRs land is a follow-up.
chaploud
added a commit
that referenced
this pull request
Apr 29, 2026
`examples/rust/build.rs` gained a Windows arm: - Dynamic linking copies `zwasm.dll` from `zig-out/bin/` next to the cargo target binary so the OS finds it via the executable directory at runtime. PE has no analogue of `-Wl,-rpath`. - Static linking uses `zwasm.lib` (not `libzwasm.a`) and skips the POSIX-only `-lc` / `-lm` (Windows MSVC auto-links the CRT). The `if: runner.os != 'Windows'` guard on the `Run Rust FFI example (dynamic)` step is dropped accordingly. Plan C-c. Mac/Linux paths unchanged. The static-link Rust sub-test in `test/c_api/run_static_link_test.sh` is still SKIP'd on Windows in PR #69; un-skipping it once both PRs land is a follow-up.
2 tasks
chaploud
added a commit
that referenced
this pull request
Apr 29, 2026
…fresh (#77) - CHANGELOG.md [Unreleased]: tag the Plan C-a/b/c/d/e/f and W52 entries with their PR numbers (#68/#69/#71/#70/#72/#74) so the next /release roll-up has authoritative provenance; add D137 to the Internal section (cross-platform stripping + per-OS size ceilings, recorded post-#73); add one-line entries for the doc-alignment sweep (#75) and the obsolete-checklist drop (#76). - .dev/memo.md ## Current Task: append #74/#75/#76 to the post- morning PR list (was "Six new PRs", now "Nine"); replace the "in flight: #74" paragraph with #74 in the merged list; bump bench-record range to #68..#76. The "Plan B sub-3 / W50 still pending" pointer through resume-guide.md remains intact. No behaviour change. Doc-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Plan C-d. Plan C-a (#68) was the prior step. Five guards remaining: C-b, C-c, C-e, C-f, C-g.
Test plan