So from my understanding the new WASM backend is n...
# webassembly
k
So from my understanding the new WASM backend is no longer using LLVM… If not, then what is it using? How is Kotlin creating wasm file?
h
It is a new compiler backend like jvm or js (and I guess some parts of js are shared).
s
It uses its own code for emitting wasm binary
The pipeline is roughly
.kt
->
.klib
->
wasmIR (in-memory)
->
.wasm
c
If my understanding is correct, the first step is done by K2, so it's common with all platforms, right?
s
Currently, the first step is K1. But we plan to move it to K2 with all other platforms.
Most of the compiler code is shared with JVM, JS and Native platforms.
c
JS IR uses K1 too, right?
s
It does, currently.
c
Thanks, sorry for derailing the subject a bit 🙏
a
@CLOVIS thanks for asking these questions. I was working on the similar assumptions as well. This clears up things a biy for me too