mirror of
https://github.com/praetorian-inc/wasmforge
synced 2026-06-22 22:52:31 +00:00
108f19cb36
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.