truffleruby icon indicating copy to clipboard operation
truffleruby copied to clipboard

WASI p1 support

Open usiegl00 opened this issue 5 months ago • 1 comments

With SubstrateVM now compiling to WASI p1 with --tool:svm-wasm, next is TruffleRuby running on WASM. I tried running the following with --tool:svm-wasm, but it looks like the --language:ruby flag was removed from the native-image tool. https://github.com/oracle/truffleruby/blob/d583795f22941cfac6342e9a226acf5f0f61e5a9/doc/contributor/native-image.md?plain=1#L86 Any insight into hacking the mx build to target wasm would be very helpful.

See: https://2025.wasm.io/sessions/the-future-of-write-once-run-anywhere-from-java-to-webassembly/ See: #82

usiegl00 avatar Jun 10 '25 01:06 usiegl00

Right, that part is outdated, --language:ruby is a legacy macro and that's gone now.

These days, you would get the jars from Maven for org.graalvm.polyglot:ruby, and either use the Native Image Maven/Gradle plugin or get the full classpath of the dependencies via something like mvn dependency:build-classpath.

eregon avatar Jun 11 '25 11:06 eregon