Skip to content

Latest commit

 

History

History
58 lines (46 loc) · 2.57 KB

MVP.md

File metadata and controls

58 lines (46 loc) · 2.57 KB

Minimum Viable Product

As stated in the high-level goals, the first release aims at being a Minimum Viable Product (MVP). This means that there are important features we know we want and need, but are post-MVP; these are in a separate essential post-MVP features document. The MVP will contain features which are available today in modern web browsers and which perform well even on mobile devices, which leads to roughly the same functionality as asm.js.

This document explains the contents of the MVP at a high-level. There are also separate docs with more precise descriptions of:

Note: This content is still in flux and open for discussion.

Linear Memory

  • In the MVP, when a WebAssembly module is loaded, it creates a new linear memory which isn't directly accessible from other modules.
  • The dynamic linking feature will be necessary for two WebAssembly modules to share the same linear memory.
  • Modules can specify memory size and initialization data (data, rodata, bss) in the memory-initialization section.
  • Modules can specify whether memory is growable (via sbrk).
  • Modules can optionally export memory, allowing it to be aliased by the embedder, such as JavaScript:
    • JavaScript sees the exported memory as an ArrayBuffer.
    • To keep an ArrayBuffer's length immutable, resizing a module's memory detaches any existent ArrayBuffer.
  • See the AST Semantics linear memory section for more details.

Binary format

  • A binary format provides efficiency: it reduces download size and accelerates decoding, thus enabling even very large codebases to have quick startup times. Towards that goal, the binary format will be natively decoded by browsers.
  • The binary format has an equivalent and isomorphic text format. Conversion from one format to the other is both straightforward and causes no loss of information in either direction.

Text format

The text format provides readability to developers, and is isomorphic to the binary format.

Security

WebAssembly MVP will be no looser from a security point-of-view than if the module was JavaScript or asm.js.