nLab WebAssembly

See also virtual machine, hyperledger, EOS, Rust.

WebAssembly (wasm) is a modern low level language (mimicking assembly code, but independent of a machine) intended for execution a virtual machine. It is represented in one of the three common forms. Virtual machine accepts the bytecode version. The corresponding assembly like representation is also used where the commands are given the names as usual. The third is lisp-like bracketed notation, the so called S-expression representation (which is complemented by a little bit of additional information not explicit in assembly like representation). It is optimized for small compiling time and near native execution time, at least when implemented on a virtual machine on one of major computer architectures (like the x86 or ARM series). It is created as a new VM standard for web browsers, backed by major internet companies; it is also used or planned on a number of blockchain projects, most notably Parity Substrate. On web browsers it is highly interoperable with JavaScript.

Rust language has small runtime, which is desirable in common applications of WebAssembly. Thus Rust commonly compiles either to native code or to wasm.

General support for wasm outside of browsers is not yet standardized. One has to complement sandboxed wasm with some system calls to have reasonable functionality. WASI is a generic term for the wasm system interface.

Efficiency of wasm and its standardization and programming tools support make wasm VM ideal for distributed ledger applications. Ethereum flavoured version of wasm VM specification is at github/ewasm, see also github/ewasm/design. eWasm has a testnet. According to article ewasm explained,

The ewasm specification consists of a subset of WebAssembly components suitable for Ethereum’s needs, namely determinism and relevant features. It also includes a number of system smart contracts that provide access to Ethereum platform features.

EOS is a high performance distributed ledger using wasm VM.

Last revised on May 3, 2019 at 13:38:12. See the history of this page for a list of all contributions to it.