State of WebAssembly in Kotlin

Hi, everybody!

I just wanted to clarify the current situation of supporting WebAssembly in Kotlin.

We are working on a dedicated Kotlin to WebAssembly compiler backend.
So all works on wasm support in Kotlin/Native (through LLVM) were suspended.

For the new compiler backend, we have set the following goals:

  • produce small binaries – to achieve it we decided don’t use own memory manager and use builtin one instead (see GC proposal);
  • fast compilation while developing – for that, we are going to be able to generate binaries directly;
  • better integration with hosts, especially with their GC to avoid leaks.

Besides GC proposal we also depend on some other proposals that aren’t finalized yet. It’s hard to predict when all of them will be finalized and implemented.
We have joined WebAssembly community group to work on proposals along with other stakeholders. Also, we are collaborating with some of Wasm VM vendors to get things done as early as possible and with our interests in mind.

As well as other kotlin compiler backends it’s developed inside a public repository, so actual sources could be found here.

We’ll try to keep you up to date, stay tuned!

P.S. Join us in #webassembly channel in Kotlin Slack! (Get invite)