Repository navigation
docs: JSPI and wasm exceptions across the browser stack (JX1-JX4 plan) - #1308
Merged
Merged
Conversation
Joe decided on 2026-11-16 to move every wasm host from Asyncify to JSPI, and libcvc and every cvcpkg wasm package from JS exceptions and longjmp to wasm's own. That settles ARIADNE_SCRIPTING_HOSTS.md section 9, item 13. WASM_JSPI_EXCEPTIONS.md is the plan. It covers: - why (#1272's numbers); - a mixed-link table from emsdk 5.0.7, which shows the break runs both ways; - which archives in ariglx-web's closure use JS longjmp or JS exceptions; - the four phases: JX1 cvcpkg, JX2 libcvc, JX3 guests, JX4 the switch. Section 8.5 now gives the current browser support (Firefox 153 and Safari 27 have shipped JSPI). It also says there is no Asyncify fallback, since Asyncify and wasm exceptions don't compose.
…he PR open until JX4 JX1 started in cy-pca/cvcpkg (feat/wasm-exceptions): - The flag goes through EMCC_CFLAGS, which only emcc reads, not CFLAGS, since several recipes build native host tools beside it. - The pack gate reads wasm import sections itself and checks LTO bitcode's personality. - A scan of all 126 latest wasm and wasm-mt bundles on cvcpkg.org found 13 cvcpkg recipes with JS-exception or JS-longjmp objects, plus libcvc's own three. Only those 13 are bumped. - The cvcpkg PR stays open until JX4: on master, the flag would put bundles today's libcvc can't link onto prod.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The plan for moving the browser stack to JSPI and wasm exceptions. Joe decided it on 2026-11-16: "we should use JSPI and also add -fwasm-exceptions to packages on cvcpkg". Docs only.
New file:
docs/roadmap/WASM_JSPI_EXCEPTIONS.md. InARIADNE_SCRIPTING_HOSTS.md, §8.5 and §9 item 13 now record the decision.What decides the plan
There's no Asyncify fallback. emsdk 5.0.7 warns that Asyncify and
-fwasm-exceptionsdon't compose. All three engines ship JSPI: Chrome 137, Firefox 153 (21 July 2026) and Safari 27 (September 2026). A browser without it gets a page that says what it needs.The break runs both ways. I linked small programs in every mix under emsdk 5.0.7:
emscripten_longjmpundefined).__resumeExceptionundefined).__wasm_longjmpand__c_longjmpundefined).So the packages that use JS longjmp or JS exceptions switch on the same day as libcvc.
Few packages force that. Of the 301 archives
ariglx-weblinks, 12 do, from about eight recipes: libpng, freetype, libtiff, libjpeg-turbo, VTK, ImageMagick, and boost's test libraries. CPython and numpy don't.The rebuild is cheap in storage. The latest wasm and wasm-mt bundles total about 1 GiB, against the org's 30 GiB.
Phases
-fwasm-exceptionsin_common/env-wasm.sh, a pack gate against JS longjmp and JS exceptions, and every wasm recipe rebuilt to the dev catalog-fwasm-exceptions,-sJSPIon every host, the audit of where it suspends, and tests on a node with JSPIari.gasNot covered
ariglx-web's prefix was scanned. JX1's gate checks each package as it rebuilds.