Skip to content

Instantly share code, notes, and snippets.

Last active May 28, 2017
What would you like to do?
# WebAssembly (
Open Web Standard, developed by W3C Community Group
"portable, size- and load-time-efficient format suitable for compilation to the web."
Supported by all major browser vendors (v1 available in Chrome, Firefox, Safari, Edge; partly behind flag)
Write once - run anywhere? The VM which kept that promise is the browser and JS has for long been is its only native language.
Highlevel Language (C, C++, Rust) -> Intermediate Representation (IR) -> wasm -> x86/ARM
WebAssembly is a instruction set for a conceptual machine (Stack machine)
Emscripten - emcc hello.c -s WASM=1 -o test.html
Calling WebAssembly from JS.
let importObject = {};
.then(response => response.arrayBuffer())
.then(bytes => WebAssembly.instantiate(bytes, importObject))
.then(results => {
MDN Docs
WASM Explorer
* Compiling for the Web with WebAssembly (Google I/O '17)
* WebAssembly Demystified
* A cartoon intro to WebAssembly
* Threads
* Direct DOM Access / Browser APIs
* Support for GC-languages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment