Closed
Description
https://github.com/ingydotnet/graal-native-image-wasm-demo?tab=readme-ov-file
Fully automates the https://github.com/graalvm/graalvm-demos/tree/fniephaus/wasm-demo/native-image/wasm-helloworld HelloWorld Wasm demo, and it works beautifully.
But I get this error trying to compiling a Clojure uberjar. Here's the error
Error: Error loading a referenced type: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Method com.oracle.svm.core.thread.Target_java_lang_Thread.isInterrupted() is not available in this platform.
Error encountered while parsing java.lang.VirtualThread.runContinuation(VirtualThread.java:275)
Parsing context:
at java.lang.VirtualThread$$Lambda/0x00000000bd5f5a48.run(Unknown Source)
at jdk.internal.net.http.HttpClientImpl$SelectorManager.lambda$run$5(HttpClientImpl.java:1392)
at jdk.internal.net.http.HttpClientImpl$SelectorManager$$Lambda/0x00000000bd5b4d40.accept(Unknown Source)
at clojure.lang.PersistentVector$3.forEachRemaining(PersistentVector.java:382)
I can provide all the details tomorrow if needed.
I hope that between the Clojure and GraalVM communities, this can be worked out soon. It would be awesome!!!
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
fniephaus commentedon Apr 3, 2025
Hi @ingydotnet,
Thanks for raising this ticket. The Wasm backend for GraalVM currently does not support threading, networking, and a couple of other essential features. We are continuing to work on this and hopefully not too soon, you should be able to compile your Clojure uberjar into a Wasm module.
I hope it's ok if I close this ticket for now. Please try again in a couple of months :)
roman01la commentedon Apr 25, 2025
@fniephaus hey, I just started looking into running Clojure in wasm, basic stuff works, it's amazing! Where can I follow the progress on these missing pieces?