V8 2026-11-05
V8 is an open-source engine implementing JavaScript through ECMAScript and also executing WebAssembly. It can be embedded in applications, so the engine and the application supplying its environment are distinct components.[ref]
For a simple language-level example, [1, 2, 3].map(x => x * x) evaluates to an array containing 1, 4, 9. The specified array and multiplication behavior belongs to ECMAScript; V8 supplies an implementation of that behavior. The same expression does not require a document or a web browser.
The project's d8 developer shell supplies a small environment for running programs. A file containing console.log(6 * 7); prints 42 when run in that shell. The multiplication is language behavior, whereas the output facility is supplied by the environment.[ref]
V8 includes Ignition, a register-based interpreter. Interpreter machinery, bytecode and compilation strategies concern how an engine executes a program, rather than changing the program's specified mathematical result.[ref]
An embedding application can supply additional objects and functions. A Document Object Model operation therefore depends on a suitable host, not merely on the presence of V8. Likewise, a performance comparison must name the engine version, workload and measurement conditions rather than treating one fast numerical expression as a measurement of an entire application.
WebAssembly 2026-11-05
WebAssembly is a portable, low-level code format with precisely specified execution and validation rules. Programs are organized into WebAssembly modules, often produced by compilation from another programming language. Its type system and stack machine semantics make operations explicit. Although designed with web applications in mind, the core format does not require a web browser.[ref]
Here is a small WebAssembly text format module exporting addition: (module (func (export "add") (param i32 i32) (result i32) local.get 0 local.get 1 i32.add)). The two local.get instructions put the arguments on the operand stack; i32.add consumes them and produces one 32-bit result. The function maps inputs 3 and 4 to 7.[ref]
Integer addition wraps modulo . For example, adding one to the bit pattern representing produces zero, rather than an arbitrarily large integer. This is a rule of the machine format, not a numerical approximation.[ref]
A WebAssembly module obtains external facilities through its host and imports. WebAssembly linear memory is a controlled memory abstraction, not unrestricted access to every host address. Validation and runtime checks provide specified boundaries, but they do not make every allowed computation harmless: an imported operation has the authority that the host gives it.
WebAssembly linear memory 2026-11-05
WebAssembly linear memory is an indexed sequence of bytes accessed by WebAssembly memory instructions. Its runtime representation records its type and current byte sequence. The length is a multiple of the WebAssembly page size, bytes, or . Declared limits give an initial minimum and optionally a maximum size in pages.[ref]
A load must fit its entire access into the current WebAssembly linear memory. For an instruction offset of zero, a four-byte i32.load in a one-page memory succeeds at address : its last accessed byte has address . At address , it would need a byte at address and therefore traps. In general, effective address and width must satisfy , where is the current length; the check includes the instruction's immediate offset.[ref]
This boundary example also distinguishes alignment from bounds. Ordinary unaligned loads are permitted; their alignment annotation is an optimization hint. A successful bounds check establishes that the accessed bytes lie inside this memory. It does not establish that the program selected its intended object.[ref]
WebAssembly module 2026-11-05
A WebAssembly module is the unit of deployment, loading and compilation in WebAssembly. It collects declarations such as functions, types and memories, can request imports, and can expose exports. Optional initialization includes data segments and a start function. A WebAssembly module is represented in a binary encoding or the readable WebAssembly text format.[ref]
Definitions use zero-based indices, with a separate index space for each kind of definition. Imported functions precede locally defined functions in the function index space. For example, with one imported function and two local functions, their function indices are respectively 0, 1 and 2; memory index 0 belongs to a different space. This explains why inserting a function import can change a numeric call target.[ref]
A WebAssembly module instance is the runtime realization of these declarations, with references to the allocated or imported objects. Keeping a WebAssembly module distinct from a WebAssembly module instance separates a code description from the state used while executing it. Imported state can be shared; the mere use of the same module does not specify all its runtime resources.[ref]