Skip to content

[Based on #2082] fix(runtime): decouple wasm from native host services#2081

Open
cpunion wants to merge 5 commits into
xgo-dev:mainfrom
cpunion:codex/wasm-runtime-no-libuv
Open

[Based on #2082] fix(runtime): decouple wasm from native host services#2081
cpunion wants to merge 5 commits into
xgo-dev:mainfrom
cpunion:codex/wasm-runtime-no-libuv

Conversation

@cpunion

@cpunion cpunion commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Depends on #2082

Summary

  • default raw GOOS/GOARCH wasm builds to the supported nogc runtime path
  • keep wasm timer, signal, unwind, symbol lookup, and platform constants off native host implementations
  • stop wasm from compiling or linking libuv, BDWGC, and native fault/unwind wrappers
  • add a gating CI matrix for js/wasm and wasip1/wasm with exact Go 1.24.2 and Go 1.26.5 toolchains
  • build llgo with the pinned primary Go toolchain before switching to the compatibility toolchain under test
  • preserve existing native and named-target selections

This PR remains stacked on #2082 so the CI job validates the complete wasm fix. After #2082 merges, its source-adaptation diff disappears from this PR.

Fixes #2080.

Validation

  • macOS arm64, Go 1.26.5:
    • js/wasm and wasip1/wasm builds pass without an explicit nogc tag
    • internal/build: 73.5% statement coverage
  • Linux amd64, Emscripten 4.0.21:
    • Go 1.24.2: js/wasm and wasip1/wasm builds pass
    • Go 1.26.5: js/wasm and wasip1/wasm builds pass
    • internal/build: 72.8% statement coverage
  • all artifacts are valid WebAssembly modules; inspected artifacts contain no uv_* or GC_* symbols

The issue reproduction is a build failure. Executing raw GOOS artifacts still requires the existing host-runner support for Emscripten imports on js and env.longjmp/shared memory on wasip1, which is outside this PR.

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cpunion
cpunion force-pushed the codex/wasm-runtime-no-libuv branch from da2ec59 to b2d09f4 Compare July 13, 2026 15:14
@cpunion cpunion added wasm WebAssembly, wasm32, and WASI support bug Something isn't working bugfix Fixes an existing bug or regression go1.26 Go 1.26 compatibility and support feature and removed bug Something isn't working feature labels Jul 16, 2026
@cpunion
cpunion force-pushed the codex/wasm-runtime-no-libuv branch from b2d09f4 to aa2ca12 Compare July 17, 2026 12:31
@cpunion cpunion changed the title fix(runtime): decouple wasm from native host services [Based on #2082] fix(runtime): decouple wasm from native host services Jul 17, 2026
@cpunion
cpunion force-pushed the codex/wasm-runtime-no-libuv branch 2 times, most recently from 2c4023a to cf878f8 Compare July 18, 2026 23:52
@cpunion
cpunion force-pushed the codex/wasm-runtime-no-libuv branch from cf878f8 to 7d92178 Compare July 20, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes an existing bug or regression go1.26 Go 1.26 compatibility and support wasm WebAssembly, wasm32, and WASI support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

llgo build runtime on wasm error

1 participant