


Yes, pretty old style, but that still works. Once you have downloaded the binaries you unpack them and you add the binaries to the PATH.

How to Run the Kotlin Native Compiler from the Command Line

You like living on the edge and take a look at the future? Cool, but do not expect first class service while doing so. We need great support and we are getting there but so far when compiling to WASM things are more difficult than when we compile Kotlin for the JVM or to JavaScript. We need far more things to be productive when writing Kotlin to be compiled to WASM and things are very rough around the edges at the moment. The Kotlin/Native compiler is based on LLVM and LLVM supports WebAssembly, ergo we can get WASM files from Kotlin source code. The first thing we should notice is that Kotlin supports WASM through its Kotlin/Native compiler. Or do you want to left behind to play with Cobol & Fortran? The Current Status of Kotlin Support for WASM On recent Chrome and Firefox it should be enabled by default. In some browsers WASM could be supported but be disabled by default. People on IE or weird mobile browsers are left out in the cold but every desktop users who bothered to get its browser from this century has support for WASM. Edge, Firefox, Chrome, Safari: they all support WASM. WASM Support in BrowsersĪt the time of writing 71% of browsers support WASM. Think of C, C++, Rust, and… Kotlin, obviously. So far we had just JavaScript, now we have an assembly for the web and we can compile all sort of languages to WebAssembly (WASM for its friends). The short answer is that WebAssembly can permit to compile seriously complex application into an efficient binary format, that can be run in web browsers with good performance. Why WebAssembly is Relevant?įor a long answer to this question read our introduction on WebAssembly: Why should you care? This article is paired with a companion repository.
