Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate WASM with Scala CLI #3316

Open
7 tasks
Gedochao opened this issue Nov 25, 2024 · 2 comments
Open
7 tasks

Integrate WASM with Scala CLI #3316

Gedochao opened this issue Nov 25, 2024 · 2 comments
Labels
enhancement New feature or request experimental Tickets tied to experimental features. Scala.js WASM

Comments

@Gedochao
Copy link
Contributor

Is your feature request related to a problem? Please describe.
We currently support emitting Wasm via Scala.js, but we do not yet integrate it with Scala CLI features.

Describe the solution you'd like
I'd like to be able to run Scala code with Wasm directly from Scala CLI.
Additionally, I'd like to be able to choose a runtime and let Scala CLI download it for me.
Unsure which runtimes should be supported, + we should likely have a default.

  • support running Wasm from Scala CLI
    • a CLI flag --wasm
    • a corresponding directive, likely a wasm param for the platform directive
  • allow to pick a Wasm runtime + have a default
    • command line option
    • directive
  • consider Wasm for other Scala CLI features (likely out of scope) and create follow-up issues

Additional context

cc @sjrd @tanishiking

@Gedochao Gedochao added enhancement New feature or request WASM labels Nov 25, 2024
@sjrd
Copy link

sjrd commented Nov 25, 2024

Note that currently, the Wasm support of Scala.js always emits JS+Wasm files. So you need a JS runtime to run it, like the existing Scala.js-on-JS.

In addition, one may need to provide specific flags to the engine, in order to enable experimental Wasm features that Scala.js-on-Wasm needs. See https://www.scala-js.org/doc/project/webassembly.html

@Gedochao Gedochao added Scala.js experimental Tickets tied to experimental features. labels Nov 26, 2024
@He-Pin
Copy link

He-Pin commented Dec 20, 2024

It would be nice to have this, then can use it in https://github.com/bddicken/languages :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request experimental Tickets tied to experimental features. Scala.js WASM
Projects
None yet
Development

No branches or pull requests

3 participants