WebAssembly

WebAssembly (wasm) is a bytecode format with a formal specification.

It comprises of two formats:

  • the .wat text format (WebAssembly Text) in S-expressions
  • the .wasm binary format 1

The wat2wasm demo is an online assembler of wasm.

Memory Model

WebAssembly features a formally-defined memory model. A WebAssembly module accesses a single “linear memory,” which functions as a flat byte array. This memory can be expanded in increments of the page size (64K), but it cannot be shrunk. ^[1]

Footnotes

  1. What is WebAssembly? - Rust and WebAssembly