com-lihaoyi / mill

Mill is a fast JVM build tool that supports Java and Scala. 2-4x faster than Gradle and 5-10x faster than Maven for common workflows, Mill aims to make your project’s build process performant, maintainable, and flexible
https://mill-build.org/
MIT License
2.16k stars 343 forks source link

Add Mill+Scala.js+WASM example (500USD Bounty) #3837

Open lihaoyi opened 1 week ago

lihaoyi commented 1 week ago

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 in scalalib/web-examples.adoc as documentation.

Quafadas commented 1 week ago

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?

lihaoyi commented 1 week ago

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

Quafadas commented 1 week ago

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.

lihaoyi commented 1 week ago

We don't have a browser in the example test suite, so you'll need to find some CLI wasm runtime to replace it

Quafadas commented 1 week ago

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.

yadavshubham01 commented 1 week ago

hey @lihaoyi look quite interesting working on it

lihaoyi commented 1 week ago

Go for it, bounties remain open until they are closed with a merged PR

Quafadas commented 1 week ago

@yadavshubham01

i guess for the avoidance of conflict - it’s all yours for a few days :-).

yadavshubham01 commented 1 week ago

hey @lihaoyi checkout this pr #3839