WebAssembly (WASM) allows code written in languages like C/C++ to run natively in web browsers. WASM code compiles to a binary format that runs with similar performance to native machine code. It provides a compilation target for languages other than JavaScript to run on the web. WASM code runs in a secure sandbox and provides consistent, predictable performance across browsers. It enables code reuse between native and web environments.
33. The distributable, loadable, and
executable unit of code in
WebAssembly is called a module.
@bmihaylov https://github.com/WebAssembly/design/blob/master/Modules.md
46. @bmihaylov
“We think Swift should be
everywhere and used by everyone.”
Craig Federighi
Apple’sWWDC 2015
https://media.wired.com/photos/593758ff5321273fc0f945e5/master/w_2666,c_limit/AppleEventTA-539935348.jpg
48. @bmihaylov
“WebAssembly fills in the gaps that would
be awkward to fill with JavaScript.”
Eric Elliott
https://jeremybutterfield.files.wordpress.com/2014/12/conclusion.jpg
50. WebAssembly makes the Web
just a compiler target away
Boyan Mihaylov / @bmihaylov / boyan.in
Editor's Notes
WebAssembly lets developers compile from C/C++ or other static-type programming languages in a format that can be loaded in the browser
It lets us reuse code and build high-performance apps running in the browser
JavaScript is a dynamic language
Parsing becomes the bottleneck
Started by Mozilla in 2013
Defines a subset of JavaScript
Does only low-level, assembly-like computations
WebAssembly lets developers compile from C/C++ or other static-type programming languages in a format that can be loaded in the browser
It lets us reuse code and create high-performance apps running in the browser
Compiler and toolchain infrastructure library for WebAssembly
asm2wasm – an asm.js-to-WebAssembly compiler tool
Integrated in Emscripten
- Not stable yet
Show basic compilation of a C program to WASMWhich files are produced and what they are used for
How to include it JavaScript
Show basic hello world compilation with printf