Scala in WebAssembly
Like Kotlin, Scala began as a JVM-specific language and has moved toward other backends like LLVM. Therefore, there are two paths for compiling Scala to WebAssembly:
- Use Java tools to compile Scala/bytecode to WebAssembly
- Use Scala Native toolchains to compile Scala to WebAssembly
If you are interested in the first way, we cover several tools in the Java section. Here, we’ll look at the case for Scala Native.
Thus far, the only hint we have seen of someone compiling Scala Native to WebAssembly is this GitHub repository.