How do I compile Kotlin to WASM?

I’ve been trying to get a command-line compiler to work to compile Kotlin to WASM, but I haven’t had much luck. As I understand it, you used to be able to use Kotlin Native to compile to WASM, but now you have to use the regular compiler or something? I really want to get into WebAssembly, & Kotlin seems like the best option right now, but I just can’t get the compiler to work. I’ve tried downloading the compiler from GitHub, but it keeps giving me Java errors that I don’t understand. Google doesn’t seem to have an answer either. I currently have the Kotlin compiler from SDK installed, I believe, but the “kotlinc-js” command says it’s no longer supported. I’m kind of at a loss & have been for three days, so any help would be very appreciated. Here’s some info about my system in case you need it:

Model: Dell XPS

OS: Debian GNU/Linux 12

Obviously I can provide more info if need be. If you have any idea, please let me know. Thanks!

submitted by /u/TaFroggo
[link] [comments]