Skip to content

Add --js-wasm-jspi and //> using wasmJspi to enable JSPI on Wasm - #4550

Open
sideeffffect wants to merge 6 commits into
VirtusLab:mainfrom
sideeffffect:feat/js-wasm-jspi
Open

sideeffffect wants to merge 6 commits into
VirtusLab:mainfrom
sideeffffect:feat/js-wasm-jspi

Conversation

@sideeffffect

@sideeffffect sideeffffect commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Needed when playing with Scala Wasm via scala-cli.

Since Scala.js 1.22 the linker links js.async/js.await on WebAssembly
only when WasmFeatures.useJSPI is set; otherwise linking fails with
"Uses an async block without JSPI support in WebAssembly". The option
is passed to the Scala.js CLI as --useJSPI, which needs a Scala.js CLI
release containing VirtusLab/scala-js-cli#209.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sideeffffect
sideeffffect marked this pull request as ready for review October 13, 2026 20:15
@Gedochao

Copy link
Copy Markdown
Contributor

note: please fill our PR template when contributing.

@Gedochao

Copy link
Copy Markdown
Contributor

Also, it seems the new test is failing.

@Gedochao
Gedochao marked this pull request as draft October 15, 2026 08:29
sideeffffect and others added 2 commits October 15, 2026 16:47
…s --useJSPI

The bundled scala-js-cli (1.22.0.1) rejects --useJSPI, so the end-to-end test
can only pass once VirtusLab/scala-js-cli#209 is released and scalaJsCli is
bumped. The option parsing and directive are covered by unit tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sideeffffect and others added 2 commits October 16, 2026 15:08
Skip it on Scala 3.3, whose compiler has no js.async/js.await support.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sideeffffect
sideeffffect marked this pull request as ready for review October 16, 2026 13:53
@sideeffffect

Copy link
Copy Markdown
Contributor Author

@Gedochao should be mergable now 👍

@sideeffffect
sideeffffect requested a review from Gedochao October 16, 2026 16:38
…alaJsTestDefinitions.scala

Co-authored-by: Piotr Chabelski <ged.subfan@gmail.com>

This branch has not been deployed

No deployments
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.

2 participants