-
-
Notifications
You must be signed in to change notification settings - Fork 360
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
Add Mill+Scala.js+WASM example (500USD Bounty) #3837
Comments
To be honest, I'll likely have a look at this for my own curiosity in the coming days if no-one were to pick it up beforehand. I think the key question, is whether the scope of the example includes a "live reload" solution? |
No, I just want a hello-world setup. Nothing fancy, just showing off that we can create a WASM output file and run it through some WASM interpreter or runtime |
An up to date browser should suffice? If so, then this looks superficially rather easy. Famous last words :-). I'll try and have a first peek tomorrow. |
We don't have a browser in the example test suite, so you'll need to find some CLI wasm runtime to replace it |
Hmmm, right, I hear you. The other option could be to wheel in playwright? Doesn't need an answer now. I'll explore it. |
hey @lihaoyi look quite interesting working on it |
Go for it, bounties remain open until they are closed with a merged PR |
i guess for the avoidance of conflict - it’s all yours for a few days :-). |
Seeks to address #3837 I have some outstanding questions; 1. As I'm altering the scalaJSModule public API, a double check here would be welcomed. In particular, I've just called the module property `emitWasm`. sjrd pretty clearly called the linker API `withExperimentalUseWebAssembly`. However, if at some point it became non-experimental, I assume that's a compatibility problem. Advice welcomed - I've gone with the simplest name possible - `emitWasm`. 2. CI will fail, because node is < 22. The runnable test does work locally for me. Does mill require, assume or otherwise advertise compatibility with any particular node version? If not, I'll simply push the node version forward in the GHA definitions. OItherwise, I'd welcome advice - I'm not clear what the best way to manage the CI would be. Those are the two points where I'd welcome advice. I think this is the path to victory; - [x] public API check? - [x] node version - [x] documentation - [x] CI green
From the maintainer Li Haoyi: I'm putting a 500USD bounty on this issue, payable by bank transfer on a merged PR implementing this.
Scala.js now supports WebAssembly output (https://www.scala-js.org/news/2024/09/28/announcing-scalajs-1.17.0/). We should have an example doc-test in
example/scalalib/web/
exercising the hello-world Scala.js webassembly dev workflow using Mill and include it inscalalib/web-examples.adoc
as documentation.The text was updated successfully, but these errors were encountered: