When wasmforge runs as a standalone binary with no source tree on disk,
injectSysshimReplace and injectPuregoSysshimReplace failed with
"cannot find wasmforge module root for sysshim injection" because all
four findModuleRoot() fallback paths returned "".
Three-part fix:
- cmd/gen-build-assets: add addSysshimDir (recursive walk) and include
the internal/sysshim tree under the "sysshim/" prefix in the bundle.
File count rises from ~399 to 442.
- internal/build/asset_cache.go: new file providing
ensureAssetsExtracted(), a process-lifetime sync.Once cache that
extracts build_assets.tar.gz to a temp dir on first call.
- internal/build/compiler.go: add sysshimSourceBase() helper that
prefers the on-disk module root (dev mode) and falls back to the
extracted asset cache (distribution mode); rewire both injection
functions to use it instead of calling findModuleRoot() directly.
GitHub-hosted macos-13 (Intel) runners are not reliably available in
the praetorian-inc org's pool, so the v1.0.1 release's darwin/amd64
matrix entry sat queued indefinitely and blocked the release job.
Replace the two separate darwin matrix entries (amd64 + arm64) with a
single darwin/universal entry that runs on macos-latest (ARM64) and:
1. Builds darwin/arm64 natively (CGO clang targets host).
2. Cross-builds darwin/amd64 via `clang -arch x86_64` — the macOS SDK
on GitHub-hosted ARM runners is universal, so x86_64 mach-O slices
link without any extra SDK install.
3. Combines both into a fat mach-O with `lipo -create`, uploaded as
`wasmforge-darwin-universal`.
Net change for downstream users: one binary instead of two for macOS,
and it Just Works on both Intel and Apple Silicon. linux/amd64 and
windows/amd64 matrix entries are unchanged.
This fix needs to be cherry-picked into wasmforge-internal so future
syncs don't reintroduce the macos-13 dependency.
The v1.0.0 release build failed because go-tree-sitter and
tree-sitter-c-sharp/bindings/go (pulled in transitively by
./cmd/wasmforge via internal/patch) are CGO-only — every .go file in
those packages has `//go:build cgo` constraints, so CGO_ENABLED=0
excludes them entirely and `go build` errors with "build constraints
exclude all Go files".
The dependency landed in commit e760329 (May 27, 2026, AST patcher
Phase 3.1) — after the last successful v0.5.7 release on May 14, so
the CGO_ENABLED=0 cross-compile worked then but silently broke once
tree-sitter joined the import graph.
Fix:
- Switch the build matrix from a single ubuntu-latest runner doing
4-way cross-compile to one native runner per target: ubuntu-latest
(linux/amd64), windows-latest (windows/amd64), macos-13 (darwin
Intel), macos-latest (darwin ARM64). Each runner ships with a
matching C toolchain (gcc / mingw / clang) for tree-sitter's C core.
- Set CGO_ENABLED=1 in the Build step.
generate-assets and release jobs stay on ubuntu-latest — cmd/gen-build-assets
does not import tree-sitter (verified via `go list -deps`), and the
final action-gh-release step only collects pre-built artifacts.
Note: this fix needs to be cherry-picked into wasmforge-internal as
well so future syncs don't lose it. The two repos currently share this
file byte-for-byte.