Fork me on GitHub
#graalvm
<
2021-02-18
>
Adam Helins07:02:33

Graal can run WASM, but here is an old tweet mentioning Graal running as WASM: https://twitter.com/thomaswue/status/943592646915878912?s=20 I cannot find any recent info about that, but it makes you dream about running Clojure JVM in the browser one day

Shantanu Kumar10:02:13

Reminds me of Blazor (from .NET camp) that can run webapps.

gklijs23:02:29

Big problem with WASM for JVM is no multi threading and no garbage collection. Both are being worked on however. It's scope is quite limited though. Like all http calls need be done via javascript.

Adam Helins13:02:23

Multi-threading is already kind of possible but relying on webworkers and experimental features (and/or poorly supported ones such as SharedArrayBuffers). Future will tell how well the end result compares to actual OS threads. GC is definitely something to think about. I don't know where the current proposals is leading. In anycase, for instance, Graal's native image embedds a GC when needed. If they do plan to target WASM (which is not unthinkable), they might be able to reuse all that, who knows. And regarding stuff like http calls going through JS (or any IO, really), this is just temporary. The end goal is clearly to expose browsers API directly to WASM but some work elsewhere needs to be done first to be effective (eg. type interfaces for exchanging complex types such as strings). The future looks very promising :)