Ways to generate WebAssembly
There are several compiler toolchain projects that can help developers compile their code from any language to wasm. Compiling native code has huge implications for the web. It means that most major performance-intensive code can now be run on the web. For instance, C++ code can be compiled to wasm using the emscripten LLVM backend. The emscripten project takes in the LLVM IR generated by the C++ compiler and converts it into WebAssembly modules in wasm format. There are also projects such as AssemblyScript, which convert TypeScript code into WebAssembly using another emscripten-like tool, called binaryen. Rust also supports emitting WebAssembly code by default using LLVM's native WebAssembly backend. Compiling ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access