https://kotlinlang.org logo
#webassembly
Title
# webassembly
j

João Esperancinha

11/24/2023, 9:58 AM
One question, I'm trying to run this example, https://github.com/Kotlin/kotlin-wasm-examples/tree/main/wasi-example, with wasmtime, but when I do it like this:
wasmtime kotlin-wasm-wasi-example-wasm-wasi.wasm
from the
/build/compileSync/wasmWasi/main/developmentExecutable/kotlin
directory if fails with this message: Error: failed to parse WebAssembly module Caused by: Invalid input WebAssembly code at offset 366: rec group usage requires
gc
proposal to be enabled
Anyone can help me with this?
s

Svyatoslav Kuzmich [JB]

11/24/2023, 10:07 AM
Wasmtime has not yet implemented the Wasm GC feature that Kotlin needs: https://github.com/bytecodealliance/wasmtime/issues/5032
👍 1
j

João Esperancinha

11/24/2023, 10:10 AM
Thanks for letting me know about this!
e

edrd

11/24/2023, 7:01 PM
You may try using it with Node.js for now, @João Esperancinha
👍 1
Since it does support GC
j

João Esperancinha

12/01/2023, 9:04 AM
I'll have a look at that. Thanks!
s

Svyatoslav Kuzmich [JB]

12/01/2023, 10:14 AM
Oh, I assumed you needed wasmtime in particular. You can find steps for running Node (and Deno!) in the repo you mentioned. Adding Gradle
-i
flag would show node and deno cli commands.
5 Views