Skip to content

Error using the new Wasm backend to native-image compile a Clojure uberjar #346

Closed
@ingydotnet

Description

@ingydotnet

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!!!

Activity

self-assigned this
on Apr 3, 2025
fniephaus

fniephaus commented on Apr 3, 2025

@fniephaus
Member

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

roman01la commented on Apr 25, 2025

@roman01la

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @ingydotnet@roman01la@fniephaus

      Issue actions

        Error using the new Wasm backend to native-image compile a Clojure uberjar ยท Issue #346 ยท graalvm/graalvm-demos