Skip to content

Add WASM support: --wasm flag with Node.js and Deno runtimes#1

Open
lostflydev wants to merge 33 commits intomainfrom
scala-wasm-support
Open

Add WASM support: --wasm flag with Node.js and Deno runtimes#1
lostflydev wants to merge 33 commits intomainfrom
scala-wasm-support

Conversation

@lostflydev
Copy link
Copy Markdown
Owner

Implements scala-cli issue VirtusLab#3316: integrate WebAssembly with Scala CLI.

What's added

  • --wasm CLI flag and //> using wasm directive to enable WASM output
  • --wasm-runtime <runtime> option and //> using wasmRuntime directive Supported values: node (default), deno, wasmtime, wasmedge, wasmer
  • --deno-version, --wasmtime-version, --wasmer-version options and corresponding directives for pinning runtime versions

Runtime support

@lostflydev lostflydev force-pushed the scala-wasm-support branch 5 times, most recently from c6453eb to ddfadbc Compare March 9, 2026 05:51
Gedochao and others added 3 commits March 9, 2026 13:33
…VirtusLab#4173)

Bumps the npm-dependencies group in /website with 1 update: [@algolia/client-search](https://github.com/algolia/algoliasearch-client-javascript).


Updates `@algolia/client-search` from 5.49.1 to 5.49.2
- [Release notes](https://github.com/algolia/algoliasearch-client-javascript/releases)
- [Changelog](https://github.com/algolia/algoliasearch-client-javascript/blob/main/CHANGELOG.md)
- [Commits](algolia/algoliasearch-client-javascript@5.49.1...5.49.2)

---
updated-dependencies:
- dependency-name: "@algolia/client-search"
  dependency-version: 5.49.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the github-actions group with 4 updates: [docker/login-action](https://github.com/docker/login-action), [docker/metadata-action](https://github.com/docker/metadata-action), [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) and [docker/build-push-action](https://github.com/docker/build-push-action).


Updates `docker/login-action` from 3 to 4
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@v3...v4)

Updates `docker/metadata-action` from 5 to 6
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](docker/metadata-action@v5...v6)

Updates `docker/setup-buildx-action` from 3 to 4
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](docker/setup-buildx-action@v3...v4)

Updates `docker/build-push-action` from 6 to 7
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@v6...v7)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: docker/metadata-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: docker/setup-buildx-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: docker/build-push-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Gedochao and others added 16 commits March 12, 2026 11:42
Bumps [undici](https://github.com/nodejs/undici) from 7.18.2 to 7.24.1.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](nodejs/undici@v7.18.2...v7.24.1)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 7.24.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the github-actions group with 1 update: [webfactory/ssh-agent](https://github.com/webfactory/ssh-agent).


Updates `webfactory/ssh-agent` from 0.9.1 to 0.10.0
- [Release notes](https://github.com/webfactory/ssh-agent/releases)
- [Changelog](https://github.com/webfactory/ssh-agent/blob/master/CHANGELOG.md)
- [Commits](webfactory/ssh-agent@a6f90b1...e838748)

---
updated-dependencies:
- dependency-name: webfactory/ssh-agent
  dependency-version: 0.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the npm-dependencies group in /website with 1 update: [sass](https://github.com/sass/dart-sass).


Updates `sass` from 1.97.3 to 1.98.0
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](sass/dart-sass@1.97.3...1.98.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-version: 1.98.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Gedochao and others added 9 commits March 24, 2026 11:34
…tusLab#4198)

Bumps the github-actions group with 1 update: [dorny/test-reporter](https://github.com/dorny/test-reporter).


Updates `dorny/test-reporter` from 2 to 3
- [Release notes](https://github.com/dorny/test-reporter/releases)
- [Changelog](https://github.com/dorny/test-reporter/blob/main/CHANGELOG.md)
- [Commits](dorny/test-reporter@v2...v3)

---
updated-dependencies:
- dependency-name: dorny/test-reporter
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](micromatch/picomatch@2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…arn/website/picomatch-2.3.2

Bump picomatch from 2.3.1 to 2.3.2 in /website
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.3.3 to 1.4.0.
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](digitalbazaar/forge@v1.3.3...v1.4.0)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-version: 1.4.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.12 to 1.1.13.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](juliangruber/brace-expansion@v1.1.12...v1.1.13)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.13
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…VirtusLab#4197)

* Add `java-test-runner` module to support running tests with pure Java

* Add more logs for debugging `java-test-runner` rather than silencing exceptions

* Add more logs for debugging `test-runner`, mirroring `java-test-runner` approach

* Adjust log verbosity in `test-runner`/`java-test-runner`

* Only hardcode pure Java frameworks in `java-test-runner`
…VirtusLab#4206)

Bumps the npm-dependencies group in /website with 1 update: [@algolia/client-search](https://github.com/algolia/algoliasearch-client-javascript).


Updates `@algolia/client-search` from 5.49.2 to 5.50.0
- [Release notes](https://github.com/algolia/algoliasearch-client-javascript/releases)
- [Changelog](https://github.com/algolia/algoliasearch-client-javascript/blob/main/CHANGELOG.md)
- [Commits](algolia/algoliasearch-client-javascript@5.49.2...5.50.0)

---
updated-dependencies:
- dependency-name: "@algolia/client-search"
  dependency-version: 5.50.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@lostflydev lostflydev force-pushed the scala-wasm-support branch from f138e4c to 17f7473 Compare April 1, 2026 13:04
Implements scala-cli issue VirtusLab#3316: integrate WebAssembly with Scala CLI.

- `--wasm` CLI flag and `//> using wasm` directive to enable WASM output
- `--wasm-runtime <runtime>` option and `//> using wasmRuntime` directive
  Supported values: node (default), deno
- `--deno-version`, `--wasmtime-version`, `--wasmer-version` options
  and corresponding directives for pinning runtime versions

- **Node.js** (default): runs Scala.js WASM output with
  `--experimental-wasm-exnref` flag, requires Node.js >= 22
- **Deno**: runs Scala.js WASM output
@lostflydev lostflydev force-pushed the scala-wasm-support branch from 17f7473 to 3358e24 Compare April 2, 2026 03:45
…imes

- Move --wasm flag to dedicated Wasm help group with --help-wasm option
- Simplify wasmOptions parsing with fold/toRight pattern
- Add runtime validation with UnrecognizedWasmRuntimeError in directives
- Auto-enable WASM when wasmRuntime directive is set
- Update reference documentation

Code style: simplify denoNeedsWasmFlag, explicit runtime match cases, clean type annotation, scalfmt
@lostflydev lostflydev force-pushed the scala-wasm-support branch from 3358e24 to 7f43349 Compare April 2, 2026 15:27
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.

3 participants