No Description

webasm.md 1.4KB

Summarise Contribution & Motivation

  • Web is becoming mature and now requires more complex applications to run on it
  • Javascript is currently only built in language
  • Javascript is not well equipped to deal with these applications or be a compile target
  • WebAssembly is a low level bytecode for the web
  • Aims to provide safe, low overhead execution
  • Better solution than plugins for safety
  • Better than asm.js for consistent performance

Methodology

  • Defines modules for each binary and therefore allows imports
  • Defines functions, not first class and not nested, call stack not exposed
  • Instructions based in a stack machine, for compactness
  • Only defines 4 types, integers and IEEE floating points
  • Has global and local variables
  • Memories defined by modules with little endianness, disjoint from code space and stack so programs can only mess up their own environment
  • Does not offer simple jumps, has structured control flow, gives single pass validation/compilation/SSA
  • Can do JIT and validation in single pass
  • Transmitted over wire in binary form, streaming compilation possible due to layout

Critical Assessment

  • Improves on native client by being available on all browsers as it is not compact and still requires knowledge of underlying system
  • Traps are not handled but need JS intervention
  • Still missing features for higher level languages
  • A compile target for the web with safety by design should prevent many exploits -