Skip to content

build(js): fix wasm build under Go 1.26 and build wasm at release - #65

Merged
reteps merged 2 commits into
mainfrom
fix/wasm-opt-nontrapping
Nov 2, 2026
Merged

reteps merged 2 commits into
mainfrom
fix/wasm-opt-nontrapping

Conversation

@reteps

@reteps reteps commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • wasm-opt now passes --enable-nontrapping-float-to-int. Go 1.26 emits saturating float→int truncations (i64.trunc_sat_f64_s) for GOARCH=wasm, which wasm-opt rejects otherwise. This must land before the toolchain bump in fix(deps): patch CVEs baked into the dockerfmt release binary #58, or the JS CI job breaks.
  • release-js now runs the full npm run build (including build-go) instead of only build-js. Until now npm shipped the committed js/format.wasm, which hadn't been rebuilt since 97ce884 and was missing later formatter changes such as # dockerfmt-ignore.

Test plan

  • With Go 1.26 + binaryen 133: npm ci && npm run build && node --test dist/format.test.js → 6/6 pass (without the flag, wasm-opt fails validation)

🤖 Generated with Claude Code

reteps and others added 2 commits November 1, 2026 22:20
Go 1.26 emits saturating float-to-int truncations (i64.trunc_sat_f64_s)
for GOARCH=wasm, which wasm-opt rejects unless the feature is enabled.
Needed before the Go toolchain bump in #58.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
release-js only ran build-js, so npm shipped whatever js/format.wasm was
committed. That copy had not been rebuilt since 97ce884 and was missing
later formatter changes (e.g. dockerfmt-ignore). Build it from the tagged
source instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@reteps
reteps merged commit 26ae2dd into main Nov 2, 2026
3 checks passed
@reteps
reteps deleted the fix/wasm-opt-nontrapping branch November 2, 2026 06:22
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