Numerical operations • Heap access using Array Buffer as linear memory space • Module system (import / export functions) • Type annotation and its formal validation • Foreign function interface (FFI) to JavaScript
C / C++ libraries • POSIX file system API • MemoryFS / IndexedDB FS / Special file JS emulation • Statically linked libraries • Inline JavaScript • asm.js function export / Object mapping with WebIDL
• Size and load efficient and portable binary format • Safe and Near-native speed execution • Designed to execute within web browsers as well as non- browser embedding • Text representation (we can "view source" of WASMs)
and executable unit of code • Behaviors specified in terms of AST (abstract syntax tree) • Linear memory model • Binary format and its equivalent text format • Designed to be implemented both by web browsers and completely difference execution environments
signed i32 i32.load8_u load 1 byte and extend it to unsigned i32 i32.load16_s load 2 bytes and extend it to signed i32 i32.load16_u load 2 bytes and extend it to unsigned i32 i32.load load 4bytes i32 load operators
Little endian • 3 layers of compression: binary encoding / structural compression / compression with generic algorithm (e.g. gzip) • Preamble & sections • Preamble: magic & version number • Section: Import / export declaration, function signature list, set of function bodies, etc
• Dynamic Linking • zero-cost exceptions • fixed-width SIMDSoon after MVP Future versions • Finer-grained memory control • Large page support • More expressive control flow • GC / DOM integration • Linear memory > 4G • etc