hello! i followed the getting started guide to use kotlin/wasm in intellij and it worked great, but i want to figure out how to compile kotlin to wasm directly on the command line, similar to `kotlinc`; i installed kotlin via homebrew on my mac and tried looking for a kotlin/wasm cli tool in
/opt/homebrew/bin/kotlin*
but these were the only ones i saw:
•
kotlin
•
kotlin-dce-js
•
kotlinc
•
kotlinc-js
•
kotlinc-jvm
and when i run
kotlinc-js -help
i don't see anything about wasm, so i'm guessing that isn't the right tool; anyways, is there a way i can do this?
s
Svyatoslav Kuzmich [JB]
02/26/2024, 3:39 PM
Hello! We don’t have a proper CLI for Wasm target yet.
We have a human-unfriendly way to do this through
kotlinc-js
. I have found a script I made for a simple case. It runs CLI two times: compiling
.klib
and
.wasm
. Additionally you will need a stdlib library of the same version with path written to STDLIB variable.