Hi! We've been trying to run our Kotlin example https://github.com/Kotlin/kotlin-wasm-nodejs-template/tree/wasi/wasmtime.
We tried the following configurations of running project:
- Coroutines compiled with Stack Switching proposal; using legacy eh for kotlin exceptions.
Running via wizeng.x86-64-linux --ext:legacy-eh --ext:stack-switching
- Coroutines compiled with Stack Switching proposal; using wasm exception handling proposal for kotlin exceptions.
Running via wizeng.x86-64-linux --ext:exception-handling --ext:stack-switching
- Coroutines compiled with default State Machine; using legacy eh for kotlin exceptions.
Running via wizeng.x86-64-linux --ext:legacy-eh
- Coroutines compiled with default State Machine; using wasm exception handling proposal for kotlin exceptions.
Running via wizeng.x86-64-linux --ext:exception-handling
For every configuration we got the following error:
Hello from Kotlin/Wasm
--- Sequence aka generator ---
Sum: -1612145124
Duration: 16380ms
--- Coroutines ---
!exception[tag=3587](<ref struct #35>) (numbers for tag are varying)
In the archive attached, you can run example compiled to WebAssembly with wizeng.x86-64-linux --ext:exception-handling --ext:stack-switching kotlin-wasm-nodejs-example.wasm
kotlin.zip
Alternatively, one can play with turning off/on exception/coroutine flags in the example repo. To compile the example, you would need to publish to maven local kotlin branch with stack switching support https://github.com/JetBrains/kotlin/tree/shefer/coroutines-stack-switching-optional-prod via ./gradlew publishToMavenLocal. Then run ./gradlew compileDevelopmentExecutableKotlinWasmWasi - in build/compileSync/wasmWasi/main/developmentExecutable/kotlin you will find the compiled binaries.
Hi! We've been trying to run our Kotlin example https://github.com/Kotlin/kotlin-wasm-nodejs-template/tree/wasi/wasmtime.
We tried the following configurations of running project:
Running via
wizeng.x86-64-linux --ext:legacy-eh --ext:stack-switchingRunning via
wizeng.x86-64-linux --ext:exception-handling --ext:stack-switchingRunning via
wizeng.x86-64-linux --ext:legacy-ehRunning via
wizeng.x86-64-linux --ext:exception-handlingFor every configuration we got the following error:
In the archive attached, you can run example compiled to WebAssembly with
wizeng.x86-64-linux --ext:exception-handling --ext:stack-switching kotlin-wasm-nodejs-example.wasmkotlin.zip
Alternatively, one can play with turning off/on exception/coroutine flags in the example repo. To compile the example, you would need to publish to maven local kotlin branch with stack switching support https://github.com/JetBrains/kotlin/tree/shefer/coroutines-stack-switching-optional-prod via
./gradlew publishToMavenLocal. Then run./gradlew compileDevelopmentExecutableKotlinWasmWasi- inbuild/compileSync/wasmWasi/main/developmentExecutable/kotlinyou will find the compiled binaries.