Edoardo Luppi
Edoardo Luppi
Hey! I can have a look at it next week, mid week. Been busy with work stuff. I'll first check what's the required effort.
> This paradigm won't work with WebAssembly, especially not across language targets. I think this depends on your goals when exposing the WASM module to target languages. Which parts of...
Ahhh, I get what you mean now. But wait, what you want to do is have: - a WASM module (`.wasm` binary) for the runtime - a WASM module for...
I would do that before, yeah. We can discuss about it in tomorrow's call in case.
Yes, Strumenta's repository supports both WASM targets (but overall, it supports * all * Kotlin targets). > due to i/o stuff It really depends on what I/O stuff we are...
IIRC you also need to provide the compiler the stdlib, e.g.: ``` -libraries={path-to}/kotlin-stdlib-wasm-js-{version}.jar (or .klib) ```
This is the command that will work: ``` kotlinc-js -ir-output-dir C:\Users\edoardo.luppi\wasm\out -ir-output-name test -Xir-produce-js -libraries kotlin-stdlib-wasm-js-2.0.0-Beta3.klib -Xwasm -Xwasm-target=wasm-js Test.kt ``` It's not mentioned anywhere and it's what made me rethink...
@ericvergnaud [Maven Central](https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-wasm-js/2.0.0-Beta3/kotlin-stdlib-wasm-js-2.0.0-Beta3.klib) is the quickest solution, or locally under Gradle's cached files.
@ericvergnaud try to use the same option positioning as mine. And you don't need -kotlin-home.
@bsideup That's how they get compiled using JDK 14 😄 Pattern matching: ``` final Object v = ""; if (v instanceof String s) { System.out.println(s); } ``` is compiled into...