Compiling Julia in WASM
WebAssembly (WASM) is a new, upcoming technology. It defines a binary code format to be executed in a stack virtual machine at near-native code execution speeds. WASM works in browsers, where it is hosted in the JS environment to replace computation-intensive JS code in applications such as games. However, WASM can also be deployed in standalone runtime environments. More than 40 programming languages use (or are trying to use) WASM as a compilation target, and Julia is no exception. Generating WASM from Julia opens up many opportunities to embed Julia apps in web interfaces. Julia has an advantage here: it generates machine code through LLVM, and LLVM supports WASM, so there seems to be a straightforward path from Julia to WASM.
A lot of work has been done in this area by Tim Short (see https://github.com/tshort/ExportWebAssembly.jl); his project provides a working prototype. Another experimental compiler, called Charlotte, was built by Mike Innes (see https...