Hacker News new | ask | show | jobs
by mwaitjmp 1460 days ago
Slightly off topic what would people recommend to use to compile Java to wasm? Is what’s currently available still fairly experimental?
4 comments

Graal has an LLVM back-end:

https://www.graalvm.org/22.1/reference-manual/native-image/L...

Then use the WASM back-end for LLVM.

Probably won't work though.

That would require garbage collection support, no? To me (very limited) knowledge, supporting gc in WASM is being worked on but not there yet.
libgc in its pre-release branch works fine with Emscripten.
I believe both TeaVM and Google’s J2CL library have experimental support for targeting wasm.
I would love to save our swing app to the browser haha
Cheerpj can do that, though it's slow and I'm not sure what the license is.