Skip to content

j2cl-box2d: update J2CL and drop the wasm:js-string stubs (needs Safari 26.2) - #330

Open
danleh wants to merge 1 commit into
WebKit:mainfrom
danleh:wasm-j2cl-update
Open

danleh wants to merge 1 commit into
WebKit:mainfrom
danleh:wasm-j2cl-update

Conversation

@danleh

@danleh danleh commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Part of #277. cc @jrmuizel

This raises the minimum browser versions for JetStream's Wasm workloads to Safari 26.2 (December 2025, was 18.4) and Firefox 134 (January 2025, was 131). J2CL's output imports 7 wasm:js-string functions (JS String Builtins) and has no JS fallback, and this PR removes the stubs that let it instantiate in engines without the builtins. Chrome has the builtins since 130, so its minimum stays at 137.

Build j2cl-box2d-wasm with J2CL 6a6e6d7d5d (October 2026, was fbbe1e6db2 from August 2025), which also brings a newer Binaryen (6de3a0b, after v133).

To review (2 files, +4/−85; the other 4 files are build output):

  • add-fixed-run-count-api.patch is gone: J2CL's Box2D benchmark has the fixed run-count API upstream now (9e5e5b5697). The other Box2D changes since fbbe1e6db2 are style edits.
  • build.sh no longer adds the 7 wasm:js-string stub imports to the entry JS (the FIXME for Safari). The workload never called them; they only let the module instantiate in engines without JS String Builtins. If 3.1 should still run in Safari 18.4 to 26.1, the stubs can go back without changing the rest of this PR.
  • build.sh logs the date in UTC, like the other workloads, and clones quietly.

Binaries: Box2dBenchmark_j2wasm_binary.wasm shrinks from 81,878 to 75,213 bytes.

Scores (measured on a Linux x64 workstation with jsvu shells, each test alone in a fresh shell, 6 rounds; change of the mean score, rounds won in parentheses, bold = statistically significant at 95% confidence; @kmiller68 may want to check on macOS / arm64):

Test d8 (15.9.60) jsc (325217) SpiderMonkey (160.0b3)
j2cl-box2d-wasm +4.2% (4/6) +3.7% (6/6) +5.1% (5/6)
First and Average subscores
Test d8 First / Average jsc First / Average SpiderMonkey First / Average
j2cl-box2d-wasm +4.3% / +6.4% +2.9% / +5.3% +8.2% / +3.4%

This raises the minimum browser versions for JetStream's Wasm workloads
to Safari 26.2 (was 18.4) and Firefox 134 (was 131); Chrome stays at
137. J2CL's output imports JS String Builtins ("wasm:js-string") and
has no JS fallback.

Build with J2CL 6a6e6d7d5d (October 2026, was fbbe1e6db2 from August
2025), which also brings a newer Binaryen (6de3a0b, after v133).

- J2CL's Box2D benchmark has the fixed run-count API upstream now
  (9e5e5b5697), so add-fixed-run-count-api.patch is gone. The other
  Box2D changes since fbbe1e6db2 are style edits.
- build.sh no longer adds the 7 "wasm:js-string" stub imports to the
  entry JS (the FIXME for Safari). The workload never called them;
  they only let the module instantiate in engines without JS String
  Builtins, which Safari ships since 26.2.
- build.sh logs the date in UTC, like the other workloads, and clones
  quietly.

Box2dBenchmark_j2wasm_binary.wasm shrinks from 81,878 to 75,213 bytes.

Score change, d8 (15.9.60) / jsc (325217) / SpiderMonkey (160.0b3) (each
test alone in a fresh shell, 6 rounds): +4.2% / +3.7% / +5.1%.

Part of WebKit#277.
@danleh
danleh requested review from eqrion and kmiller68 November 3, 2026 17:33
@netlify

netlify Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for webkit-jetstream-preview ready!

Name Link
🔨 Latest commit 3afcc2c
🔍 Latest deploy log https://app.netlify.com/projects/webkit-jetstream-preview/deploys/6aea1b00d531d2567c33496b
😎 Deploy Preview https://deploy-preview-330--webkit-jetstream-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@danleh danleh added the v3.1 label Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant