My question is if anyone has experimented with compiling the subset of the current compiler or K2 required to generate WASM into WASM. This would allow Kotlin to be interactively compiled and run entirely in the browser, which has significant advantages.
We've been experimenting with Pyodide
, which can execute Python entirely in the browser, including C dependencies. We use it for a web-based console and editor. It is shockingly fast, and provides a much better experience than systems that have to do a round trip to an interpreter or compiler on the backend. We would like to do the same with Kotlin.