Compiling C to WebAssembly and Running It - without Emscripten

ConclusionIt's now possible to compile C source files to WebAssembly with a stock LLVM toolchain devoid of Emscripten. With some extra effort, the C standard library can be included. Data can be passed into and out of a WebAssembly instance by treating pointers as indexes into a JavaScript typed array view.Unlike Emscripten, this approach to compiling WebAssembly introduces no glue JavaScript code. This means paying for only what's used. On the other hand, the approach does require some thought and work to supply the missing integration points. Fortunately, these are not too difficult to implement.
Source: Depth-First - Category: Chemistry Authors: Source Type: blogs