WebAssembly Core 3.0 (W3C), WASI 0.2 (Preview 2), and the WebAssembly Component Model (WIT & Canonical ABI) Architecture in 2026: Binary Formats, 64-KiB Linear Memory, and Capability Sandboxing

When WebAssembly 1.0 first reached W3C Recommendation status, it provided a deterministic, memory-safe, stack-based virtual instruction set architecture (ISA) engineered for near-native execution inside web browsers. Yet as backend, edge, and plugin engineers moved WebAssembly onto servers, CDN edge PoPs, database user-defined function (UDF) engines, and microservice sandboxes, a fundamental architectural limitation of Core WebAssembly surfaced: Core WebAssembly modules speak exclusively in low-level scalar numbers (i32, i64, f32, f64), 128-bit SIMD vectors (v128), and opaque references, communicating complex data structures by reading and writing raw byte offsets inside an unstructured linear memory array (65,536 bytes per page). Because every programming language toolchain (Rust, C/C++, Go, Python, C#, Zig, JavaScript) lays out strings, slices, structs, and variant enums differently in its own linear memory—and relies on its own internal allocator (malloc, dlmalloc, or a garbage collector)—two Core WebAssembly modules compiled from different languages could not call each other with high-level types without bespoke, fragile pointer-marshaling glue code.

In 2026, the production WebAssembly stack has matured into a three-pillar systems architecture standardized across the W3C WebAssembly Working Group and the Bytecode Alliance:

  1. W3C WebAssembly Core Specification (Release 3.0 / W3C Candidate Recommendation Draft, 24 November 2026): Extends the 1.0/2.0 core binary format (0x00 0x61 0x73 0x6d magic, version 0x01 0x00 0x00 0x00) with 64-bit addressable linear memories (Memory64, limits flags 0x04 and 0x05), Multiple Memories, Garbage Collection (WasmGC) composite struct (0x5F), array (0x5E), and recursive rec (0x4E) heap types, Typed Function References, Tail Calls, and Exception Handling (tag section ID 13 and exn heap type 0x69).
  2. The WebAssembly Component Model (WIT & Canonical ABI): Wraps one or more isolated Core WebAssembly modules inside a self-describing binary component envelope (discriminated in the 8-byte preamble by version 0x0d 0x00 and layer 0x01 0x00). Using Wasm Interface Types (WIT) for declarative schema contracts and the Canonical ABI (canon lift, canon lower, cabi_realloc) for deterministic lifting and lowering across shared-nothing linear memories, components written in Rust, Go, Python, and C++ compose directly without sharing heap pointers.
  3. WASI 0.2 (WebAssembly System Interface Preview 2): Replaces the monolithic, POSIX-coupled wasi_snapshot_preview1 ABI with modular, capability-based WIT worlds—most notably wasi:cli/command@0.2.8 for command-line workloads and wasi:http/proxy@0.2.8 for stateless and streaming HTTP request/response microservices—where zero ambient authority exists and every I/O stream, clock, socket, or pre-opened directory handle must be explicitly granted by the host.
WebAssembly Compilation and Runtime Execution Architecture Diagram

WebAssembly Compilation and Runtime Execution Architecture Diagram

This engineering guide dissects the exact binary byte layouts, LEB128 variable-length integer constraints, Core section IDs (0–13) versus Component section IDs (0–12), linear memory page geometry and virtual-memory guard regions, WIT type systems and resource handle tables (own<T> and borrow<T>), Canonical ABI alignment/size/flattening algorithms (MAX_FLAT_PARAMS = 16, MAX_FLAT_RESULTS = 1), WASI 0.2 worlds, and production execution mechanics in Wasmtime (Cranelift compilation, Spectre mitigations, deterministic fuel versus epoch interruption). Every hexadecimal opcode, byte formula, and code contract in this article is verified directly against the official W3C WebAssembly Core Specification, the WebAssembly Component Model specifications, the WASI 0.2 repository, and the Wasmtime engineering documentation.


1. From Core WebAssembly 1.0/2.0 to W3C Core 3.0 and the Component Model: Solving the Shared-Everything ABI Bottleneck

To appreciate why the WebAssembly ecosystem separated Core Modules from Components, consider what happens when a host runtime or another guest module invokes an exported function process_user(name: string) -> result<u32, string> on a traditional Core WebAssembly module:

  1. No High-Level Types at the Core Boundary: A Core WebAssembly function signature (0x60) can only accept and return sequences of valtype primitives (i32, i64, f32, f64, v128, or opaque references). At the core ABI level, a string does not exist; it is typically lowered by a language compiler into a (ptr: i32, len: i32) pair pointing into that module's private linear memory index 0.
  2. Asymmetric String Encodings and Allocator Ownership: A Rust or Go module encodes strings in linear memory as contiguous UTF-8 bytes, whereas a Java, C#, or JavaScript engine often represents strings internally as UTF-16 or Latin-1 + UTF-16. Worse, if Module $A$ wants to pass a string to Module $B$, Module $A$ cannot simply pass an i32 offset from Module $A$'s linear memory, because Module $B$ has its own disjoint linear memory space. Module $A$ (or the host) must first invoke an exported allocator function inside Module $B$ to reserve destination bytes, transcode or copy the string bytes into Module $B$'s linear memory, invoke the target function, and then invoke a post-return deallocator so Module $B$ does not leak heap pages.
  3. Vulnerability of Shared-Everything Linking: Early experiments attempted to link multiple C/C++/Rust libraries into a single shared linear memory ("shared-everything dynamic linking"). While workable for homogeneous C toolchains, sharing a single linear memory across untrusted third-party libraries destroys isolation: a single buffer over-read or use-after-free in a C dependency can corrupt the allocator metadata or cryptographic secrets of the main application residing in the same linear address space.
  4. Shared-Nothing Component Isolation ("Nanoprocesses"): The WebAssembly Component Model enforces a shared-nothing architecture by default. Each component encapsulates its own private Core WebAssembly module(s) and its own private linear memory. Cross-component calls pass through typed WIT interfaces governed by the Canonical ABI: the runtime validates and lifts values out of the caller's linear memory and lowers them into freshly allocated space in the callee's linear memory via the callee's explicit realloc callback (cabi_realloc), guaranteeing that neither component can ever read or corrupt the other's private heap or stack.
Architectural Dimension Core Wasm 1.0 / 2.0 Module W3C Core Wasm 3.0 Module (Nov 2026 CRD) Wasm Component Model + WASI 0.2
8-Byte Binary Preamble 00 61 73 6d 01 00 00 00 (Magic + Version 1) 00 61 73 6d 01 00 00 00 (Magic + Version 1, Layer 0) 00 61 73 6d 0d 00 01 00 (Magic + Version 0x0d, Layer 0x01)
Boundary Type System i32, i64, f32, f64, v128, funcref, externref Adds WasmGC struct, array, rec, i31ref, exnref, non-null (ref $t) WIT algebraic types: string, list<T>, record, variant, result<T,E>, own<R>, borrow<R>
Linear Memory Addressing Single 32-bit memory (max 65,536 pages = 4 GiB) Multiple memories + 64-bit addressing (Memory64, limits 0x04/0x05) Shared-nothing per-component linear memory mediated by Canonical ABI lift/lower
System Interface Standard wasi_snapshot_preview1 (C pointers, POSIX-like errno integers) Host-defined imports / core WASI bindings WASI 0.2 (Preview 2): wasi:cli/command@0.2.8, wasi:http/proxy@0.2.8, typed resources & streams
Cross-Language Composition Manual FFI pointer math or shared C heap WasmGC shared heap types or low-level imports Zero-glue virtualizable composition via WIT worlds & Canonical ABI

2. Core WebAssembly Binary Format: Magic Preamble (0x00 0x61 0x73 0x6d), LEB128 Variable-Length Integers, and the 14 Module Sections (IDs 0–13)

According to the official W3C WebAssembly Core Specification (https://www.w3.org/TR/wasm-core-2/ and https://webassembly.github.io/spec/core/binary/modules.html), a Core WebAssembly binary module begins with a fixed 8-byte preamble consisting of a 4-byte magic number (\0asm in ASCII) and a 4-byte little-endian version integer (1):

$$\mathtt{magic} ::= \mathtt{0x00\;\;0x61\;\;0x73\;\;0x6D} \qquad \mathtt{version} ::= \mathtt{0x01\;\;0x00\;\;0x00\;\;0x00}$$

LEB128 Variable-Length Integer Encoding Constraints

All integers inside the binary format (section byte lengths, vector counts, type indices, local indices, and i32.const / i64.const immediates) are encoded using LEB128 (Little Endian Base 128) in either unsigned (uN) or signed two's-complement (sN) form (https://webassembly.github.io/spec/core/binary/values.html):

  • Each byte contributes 7 payload bits (bits 0..6, mask 0x7F), ordered from least significant group to most significant group.
  • Bit 7 (0x80) serves as the continuation flag: 1 indicates that more bytes follow; 0 marks the final byte of the integer.
  • Strict Byte-Length Cap: To prevent overlong integer encodings from bypassing single-pass validators, the specification mandates that the total number of bytes encoding an $N$-bit integer (uN or sN) must not exceed $\lceil N / 7 \rceil$ bytes:
  • For a 32-bit integer (u32 or s32): $\lceil 32 / 7 \rceil = \mathbf{5\text{ bytes}}$ maximum. Furthermore, in the 5th byte of a u32, the upper 3 payload bits (0x70) must be 0 so that the decoded value satisfies $n < 2^{32}$.
  • For a 33-bit signed type/block index (s33): $\lceil 33 / 7 \rceil = \mathbf{5\text{ bytes}}$ maximum.
  • For a 64-bit integer (u64 or s64): $\lceil 64 / 7 \rceil = \mathbf{10\text{ bytes}}$ maximum.
Core WebAssembly Binary Module Layout (W3C Core 3.0):
+-----------------------------------------------------------------------+
| Preamble (8 Bytes):                                                   |
|   Magic:   0x00 0x61 0x73 0x6D  ("\0asm")                             |
|   Version: 0x01 0x00 0x00 0x00  (Little-Endian Version 1)             |
+-----------------------------------------------------------------------+
| Sequence of Sections:  section_N(X) ::= N:byte  len:u32  contents:X   |
|   (Custom Section ID 0x00 allowed before, between, or after any ID)   |
|   Prescribed Binary Order of Non-Custom Sections:                     |
|   ID 1 (Type) -> ID 2 (Import) -> ID 3 (Func) -> ID 4 (Table) ->      |
|   ID 5 (Mem)  -> ID 13 (Tag)   -> ID 6 (Global)-> ID 7 (Export)->     |
|   ID 8 (Start)-> ID 9 (Elem)   -> ID 12 (DataCount) ->                |
|   ID 10 (Code)-> ID 11 (Data)                                         |
+-----------------------------------------------------------------------+

The 14 Core WebAssembly Binary Section IDs (0–13) and Streaming Compilation Order

Every section in a Core WebAssembly binary has the wire layout N:byte | len:u32 | contents:X, where N is a 1-byte section ID and len is the exact byte length of X (||X||). A module is rejected as malformed if len does not match the decoded byte length of X. All non-custom sections are optional and may occur at most once in a strict prescribed sequence. Notice a crucial subtlety in the W3C Core 3.0 specification (https://webassembly.github.io/spec/core/binary/modules.html): Section IDs 12 (Data Count) and 13 (Tag) do not appear in numerical ID order inside the binary stream! Because they were introduced after Wasm 1.0 to support single-pass validation of bulk-memory instructions and exception handling, Tag Section (13) is placed immediately after Memory Section (5) and before Global Section (6), while Data Count Section (12) is placed immediately before Code Section (10):

Binary Order Section ID (Dec / Hex) Section Name Binary Grammar & Single-Pass Validation Role
Any position 0 (0x00) Custom Section name:utf8 | byte* — Carries debug DWARF info, symbol names (name), or producer metadata. Ignored by core execution semantics.
1st 1 (0x01) Type Section list(rectype) — Defines all function (0x60), struct (0x5F), array (0x5E), and recursive (0x4E) types referenced by typeidx.
2nd 2 (0x02) Import Section list(nm1:name nm2:name xt:externtype) — Two-level namespace imports (0x00 func, 0x01 table, 0x02 mem, 0x03 global, 0x04 tag). Imported indices always precede module-defined indices.
3rd 3 (0x03) Function Section list(typeidx) — Declares the signature index for each module-defined function. Separated from bodies (ID 10) to enable parallel streaming compilation.
4th 4 (0x04) Table Section list(table) — Declares reference tables (e.g., funcref 0x70 or externref 0x6F) used for call_indirect and host handles.
5th 5 (0x05) Memory Section list(memtype) — Declares linear memories via limits (0x00/0x01 for i32 pages; 0x04/0x05 for i64 pages) in 65,536-byte (64 KiB) page units.
6th 13 (0x0D) Tag Section list(0x00 x:typeidx) — Declares exception tags for Wasm 3.0 structured exception handling (throw, try_table). Must precede Globals and Code.
7th 6 (0x06) Global Section list(valtype mut:0x00|0x01 expr) — Immutable (0x00) or mutable (0x01) globals (e.g., linear shadow stack pointer $__stack_pointer).
8th 7 (0x07) Export Section list(name externidx) — Exposes functions, tables, memories, globals, or tags with unique UTF-8 names to the host or component wrapper.
9th 8 (0x08) Start Section x:funcidx — Optional function automatically invoked upon module instantiation after memories and tables are initialized.
10th 9 (0x09) Element Section list(elem) — Bitfield-tagged (0..7) active, passive, or declarative segments initializing table slots.
11th 12 (0x0C) Data Count Section n:u32 — Declares the exact number of data segments before Section 10 so single-pass validators can verify memory.init and data.drop indices.
12th 10 (0x0A) Code Section list(len:u32 locals* expr) — Compressed local declarations (count:u32, valtype) and bytecode instructions for every function in Section 3.
13th 11 (0x0B) Data Section list(data) — Active (mode 0 or 2) or passive (mode 1) raw byte segments loaded into linear memory. Count must equal Section 12.

3. Core Value Types, WasmGC Heap Types, and Linear Memory Architecture (64-KiB Pages, Memory64, and 2-GiB Virtual Memory Guard Regions)

In the binary format (https://webassembly.github.io/spec/core/binary/types.html), Core WebAssembly value types (valtype) and heap types (absheaptype) are encoded as single bytes corresponding to small negative 7-bit signed LEB128 values (s7), allowing them to coexist unambiguously with non-negative s33 type indices in block and reference positions:

  • Number Types (numtype):
  • i32 $\rightarrow$ 0x7F (SLEB128 -1)
  • i64 $\rightarrow$ 0x7E (SLEB128 -2)
  • f32 $\rightarrow$ 0x7D (SLEB128 -3)
  • f64 $\rightarrow$ 0x7C (SLEB128 -4)
  • Vector Types (vectype):
  • v128 $\rightarrow$ 0x7B (SLEB128 -5, 128-bit SIMD vector register)
  • Packed Storage Types (packtype, inside WasmGC structs/arrays):
  • i8 $\rightarrow$ 0x78, i16 $\rightarrow$ 0x77
  • Abstract Heap Types (absheaptype) and Reference Constructors (reftype):
  • Reference constructors: (ref null ht) $\rightarrow$ 0x63 ht, non-nullable (ref ht) $\rightarrow$ 0x64 ht (or single-byte shorthand for nullable abstract heap types).
  • func (funcref) $\rightarrow$ 0x70, extern (externref) $\rightarrow$ 0x6F, any (anyref) $\rightarrow$ 0x6E, eq (eqref) $\rightarrow$ 0x6D, i31 (i31ref, unboxed 31-bit scalar integer reference) $\rightarrow$ 0x6C, struct (structref) $\rightarrow$ 0x6B, array (arrayref) $\rightarrow$ 0x6A, exn (exnref, exception reference) $\rightarrow$ 0x69.
  • Bottom heap types: noexn $\rightarrow$ 0x74, nofunc $\rightarrow$ 0x73, noextern $\rightarrow$ 0x72, none $\rightarrow$ 0x71.

Linear Memory Page Geometry (65,536 Bytes) and Memory64 Limits (0x00–0x05)

As defined in Section "Memory Instances" of the W3C Runtime Structure specification (https://webassembly.github.io/spec/core/exec/runtime.html), a linear memory instance holds a contiguous vector of raw bytes whose length is always an exact integer multiple of the WebAssembly page constant:

$$\text{WebAssembly Page Size} = 65,536\text{ bytes} = 64\text{ KiB} = 2^{16}\text{ bytes}$$

In the binary format (limits rule in https://webassembly.github.io/spec/core/binary/types.html), each memory declaration begins with a flag byte that encodes both whether an upper page maximum $m$ is present and whether the memory uses 32-bit (i32) or 64-bit (i64, Memory64) addressing:

  • 0x00 n:u64 $\Rightarrow (\mathsf{i32}, [n .. \epsilon])$: 32-bit linear memory with minimum $n$ pages and no declared maximum (bounded by the 32-bit ceiling of $2^{16} = 65,536\text{ pages} = 4\text{ GiB}$).
  • 0x01 n:u64 m:u64 $\Rightarrow (\mathsf{i32}, [n .. m])$: 32-bit linear memory with initial size $n$ pages and maximum size $m$ pages ($m \le 65,536$).
  • 0x04 n:u64 $\Rightarrow (\mathsf{i64}, [n .. \epsilon])$: 64-bit linear memory (Memory64) with initial size $n$ pages and no declared maximum.
  • 0x05 n:u64 m:u64 $\Rightarrow (\mathsf{i64}, [n .. m])$: 64-bit linear memory (Memory64) with initial size $n$ pages and maximum size $m$ pages (supporting address spaces beyond $4\text{ GiB}$, up to $2^{48}$ bytes / $16\text{ EiB}$ architectural limits).

Virtual Memory Guard Pages and Hardware Page-Fault Bounds Checking

A critical insight from the Wasmtime Security Architecture (https://docs.wasmtime.dev/security.html) explains how production 64-bit runtimes execute 32-bit WebAssembly memory accesses (i32.load offset=K, i32.store offset=K) at near-native speed without emitting software compare-and-branch instructions before every load or store:

  1. Control-Flow and Call-Stack Separation: In Core WebAssembly, the execution call stack (return addresses, saved frame pointers, and spilled CPU registers) is completely inaccessible to WebAssembly instructions. When a source language like C or Rust needs to take the address of a stack variable, the compiler maintains a separate shadow stack pointer (global 0) inside linear memory, while real CPU return addresses live on the host's protected native stack. Traditional stack-smashing buffer overflows cannot overwrite a return address.
  2. Eliminating Explicit Bounds Checks via Virtual Address Reservation: For a 32-bit linear memory (i32), the dynamic index $i$ is an unsigned 32-bit integer ($0 \le i < 2^{32}$) and the static instruction offset $K$ is also an unsigned 32-bit integer ($0 \le K < 2^{32}$), meaning the effective address $i + K$ can reach at most $2^{33} - 2 \approx 8\text{ GiB}$. By reserving a multi-gigabyte virtual address range (mapped PROT_NONE for unallocated pages above the active memory length) via the host OS MMU, any out-of-bounds 32-bit load or store automatically lands in an unmapped virtual page and triggers a hardware SIGSEGV / SIGBUS page fault that the runtime catches and converts into a deterministic WebAssembly trap.
  3. The 2-GiB Pre-Memory Guard Region Against Sign-Extension Bugs: As documented in Wasmtime's Defense-in-Depth specification (https://docs.wasmtime.dev/security.html), Wasmtime additionally places a 2GB (2 GiB) unmapped guard region before the base address of every linear memory by default. While valid WebAssembly code can never generate a negative offset, if a compiler bug in the JIT backend (Cranelift) ever accidentally sign-extended a 32-bit unsigned offset into a negative 64-bit offset, the access lands harmlessly inside the preceding 2GB guard region and faults immediately rather than reading host memory below the linear buffer.

4. The WebAssembly Component Model Binary Format: Layer Discrimination (0x0d 0x00 0x01 0x00), Nested Core Modules, and Shared-Nothing Composition

A .wasm file on disk can contain either a Core WebAssembly module or a WebAssembly Component. How do runtimes like Wasmtime, Jco, or Wasm-Tools distinguish between them in $O(1)$ time?

According to the official Component Model Binary Format Specification (https://raw.githubusercontent.com/WebAssembly/component-model/main/design/mvp/Binary.md), the 4 bytes immediately following the \0asm magic (0x00 0x61 0x73 0x6D) are split into two 16-bit little-endian fields: a 2-byte version and a 2-byte layer:

component ::= <preamble> s*:<section>*            => (component flatten(s*))
preamble  ::= <magic> <version> <layer>
magic     ::= 0x00 0x61 0x73 0x6D
version   ::= 0x0d 0x00
layer     ::= 0x01 0x00
  • Core WebAssembly Module Preamble (layer = 0x0000): 0x00 0x61 0x73 0x6D | 0x01 0x00 | 0x00 0x00 (Version 1, Layer 0).
  • WebAssembly Component Preamble (layer = 0x0001): 0x00 0x61 0x73 0x6D | 0x0d 0x00 | 0x01 0x00 (Pre-standard Component Format Version 0x0d = 13, Layer 1; note that upon final 1.0 ratification, the version field resets to 0x01 0x00 while layer remains permanently 0x01 0x00).

The 13 Component Binary Sections (section_0 through section_12)

Unlike a Core WebAssembly module—where each non-custom section ID may appear at most once in a rigid sequence—a WebAssembly Component is a directed acyclic composition graph (DAG) of nested core modules, sub-components, instantiations, type aliases, and canonical adapters (canon lift / canon lower). Consequently, component sections 0 through 12 can be interleaved in any topological definition-before-use order:

Component Section ID Binary Grammar Production AST Construct & Architectural Role
section_0 (0x00) <core:custom> Custom metadata (e.g., component-name section, package provenance, or WIT embedded metadata).
section_1 (0x01) <core:module> (core module ...) — Embeds a complete Core WebAssembly binary module (with its own 00 61 73 6d 01 00 00 00 header) inside the component.
section_2 (0x02) vec(<core:instance>) (core instance ...) — Instantiates an embedded core module by supplying core import arguments or bundling synthetic core exports.
section_3 (0x03) vec(<core:type>) (core type ...) — Defines core function or module types for validation.
section_4 (0x04) <component> (component ...) — Embeds a nested child WebAssembly component for hierarchical composition.
section_5 (0x05) vec(<instance>) (instance ...) — Instantiates a nested component by wiring component-level interface imports to exports of sibling instances.
section_6 (0x06) vec(<alias>) (alias ...) — Projects exported items from a core instance or component instance (or outer scope) into the local index space.
section_7 (0x07) vec(<type>) (type ...) — Defines high-level WIT/Component types: record (0x72), variant (0x71), list (0x70/0x67), tuple (0x6f), flags (0x6e), enum (0x6d), option (0x6b), result (0x6a), own (0x69), borrow (0x68), stream (0x66), future (0x65), resource (0x3f), and func (0x40).
section_8 (0x08) vec(<canon>) (canon ...) — Bridges Core Wasm and Component types via canon lift (0x00 0x00), canon lower (0x01 0x00), resource.new (0x02), resource.drop (0x03), resource.rep (0x04), streams, futures, and tasks.
section_9 (0x09) <start> (start ...) — Value-consuming component initialization function.
section_10 (0x0A) vec(<import>) (import ...) — Declares strongly-unique component-level imports (interfaces, functions, resources, or types).
section_11 (0x0B) vec(<export>) (export ...) — Exposes lifted component functions, interfaces, or sub-instances to the outside world.
section_12 (0x0C) vec(<value>) (value ...) — Component-level typed constant values (each validated to be consumed exactly once).

To see how the WebAssembly Component Model works in real-world polyglot engineering, watch this verified technical session by Thorsten Hans at WASM I/O:


5. Wasm Interface Types (WIT): Package Namespaces, Rich Algebraic Types, Resource Handles (own<T> & borrow<T>), Interfaces, and Worlds

WIT (Wasm Interface Types) (https://component-model.bytecodealliance.org/design/wit.html) is the declarative interface description language (IDL) of the WebAssembly Component Model. Unlike Protobuf or OpenAPI—which specify network wire serialization formats—WIT defines in-process, strongly-typed ABI contracts between isolated WebAssembly components and host runtimes.

WIT Identifier Rules and Package Naming (namespace:package/interface@version)

Every .wit file belongs to a package declared via package <namespace>:<name>@<semver>; (for example, package wasi:http@0.2.8;). All identifiers in WIT follow strict ASCII kebab-case rules:

  • Words are separated by single hyphens (-); double hyphens (--), underscores (_), and leading/trailing hyphens are rejected at parse time.
  • Each word must consist solely of ASCII letters and digits, and every word must be either all lowercase or all UPPERCASE (e.g., incoming-handler or HTTP-proxy is valid, whereas camelCase is invalid).
  • If an identifier collides with a reserved WIT keyword (such as interface, world, record, resource), it is escaped with a leading % sign (e.g., %interface).

Primitive, Algebraic, and Resource Handle Types in WIT

WIT provides a rich type lattice that maps cleanly onto modern systems languages (Rust, C++20/23, Go, Python, TypeScript, C#) while remaining 100% free of raw memory pointers:

  1. Primitives: bool, signed integers (s8, s16, s32, s64), unsigned integers (u8, u16, u32, u64), IEEE 754 floating-point numbers (f32, f64 with canonicalized single logical nan), Unicode scalar values (char, verified in $[0, \mathtt{0x10FFFF}]$ excluding UTF-16 surrogates $\mathtt{0xD800}..\mathtt{0xDFFF}$), and UTF-encoded string.
  2. Compound & Algebraic Data Types: * list<T> (dynamically-sized sequence) and fixed-length list<T, N> ($N > 0$). * record (named product type / struct with strongly-unique field labels). * tuple<T1, T2, ...> (anonymous product type). * variant (tagged union / sum type where each case has a label and an optional payload type). * enum (unit-only tagged union without payloads). * flags (packed bitfield of $1..32$ boolean labels, stored in 1, 2, or 4 bytes). * option<T> (special case of variant with none and some(T)). * result<T, E> (fallible return type with ok(T) and error(E), where either or both payloads may be omitted, e.g., result or result<_, error-code>).
  3. Opaque Capabilities via resource, own<R>, and borrow<R>: A resource represents an unforgeable entity with lifetime and state encapsulated inside the component (or host) that defines it—such as a socket, file descriptor, HTTP request body stream, or database transaction. Components never pass the internal memory representation (rep, an i32 or i64 pointer/index private to the implementor) across component boundaries. Instead, they pass i32 table indices into the component instance's runtime handles table (Table.MAX_LENGTH = 2**28 - 1 = 268,435,455, with index 0 reserved as None): * own<R> (Binary opcode 0x69): Transfers unique ownership of the resource handle across the boundary. When the owner invokes (canon resource.drop $R) (opcode 0x03), the runtime verifies that num_lends == 0, removes the handle from the handles table, and invokes the defining component's destructor (dtor of type [i32] -> []). * borrow<R> (Binary opcode 0x68): Grants temporary, scoped access to a resource for the duration of a function call (Task / Subtask). As enforced in CanonicalABI.md, validation statically rejects any functype that returns a borrow<R> in its result type, and Task.return_ dynamically traps if self.num_borrows > 0 when the callee returns—guaranteeing at both compile time and runtime that a callee cannot retain a dangling borrowed handle after the call finishes!
package acme:edge-kv@1.0.0;

interface store {
  /// Unforgeable capability handle to an open KV bucket.
  resource bucket {
    /// Constructor: returns an owned handle `(own bucket)`
    constructor(name: string);
    /// Method: implicitly takes `(param "self" (borrow bucket))` as first argument
    get: func(key: string) -> result<option<list<u8>>, error-code>;
    set: func(key: string, payload: list<u8>, ttl-ms: u64) -> result<_, error-code>;
  }

  variant error-code {
    quota-exceeded(u64),
    key-too-large,
    backend-timeout(string),
  }
}

world kv-worker {
  import store;
  import wasi:clocks/monotonic-clock@0.2.8;
  export handle-event: func( correlation-id: string, body: list<u8> ) -> result<list<u8>, string>;
}

6. Canonical ABI Internals: Type Alignment, Element Sizes, Register Flattening (MAX_FLAT_PARAMS = 16), cabi_realloc, and String Transcoding

The Canonical ABI (https://raw.githubusercontent.com/WebAssembly/component-model/main/design/mvp/CanonicalABI.md) defines the exact mathematical mapping between high-level WIT types and Core WebAssembly linear memory and registers. Every value type $t$ has a deterministic byte alignment(cx, t) and elem_size(cx, t) (validated to satisfy $\text{elem\_size}(t) < 2^{28} = 268,435,456\text{ bytes}$):

WIT Type t alignment(t) (Bytes) elem_size(t) (Bytes in 32-bit Mem) Flattened Core Types (flatten_type) Canonical ABI Validation & Memory Rules
bool, s8, u8 1 1 ['i32'] bool stores 0 or 1; on load, any non-zero byte converts to true.
s16, u16 2 2 ['i32'] Little-endian 16-bit integer in linear memory; sign/zero-extended in i32 register.
s32, u32, f32 4 4 ['i32'] / ['f32'] f32 NaNs canonicalized to CANONICAL_FLOAT32_NAN = 0x7fc00000 on lift.
s64, u64, f64 8 8 ['i64'] / ['f64'] f64 NaNs canonicalized to CANONICAL_FLOAT64_NAN = 0x7ff8000000000000 on lift.
char 4 4 ['i32'] Traps if i >= 0x110000 or if surrogate 0xD800 <= i <= 0xDFFF.
string 4 (ptr_size) 8 (2 * ptr_size) ['i32', 'i32'] (ptr, tagged_code_units) Max byte length MAX_STRING_BYTE_LENGTH = (1 << 28) - 1 (268,435,455 B).
list<T> (dynamic) 4 (ptr_size) 8 (2 * ptr_size) ['i32', 'i32'] (ptr, elem_count) Max byte length MAX_LIST_BYTE_LENGTH = (1 << 28) - 1; elements aligned to alignment(T).
flags ($1..32$ labels) 1 ($\le 8$), 2 ($\le 16$), 4 ($\le 32$) 1, 2, or 4 ['i32'] Packed bit-vector in smallest unsigned integer fitting all flag bits.
own<R>, borrow<R> 4 (or ptr_size(rep)) 4 (or ptr_size(rep)) ['i32'] Index into ComponentInstance.handles table (or direct rep when lowering borrow into defining component).

Register Flattening Limits (MAX_FLAT_PARAMS = 16, MAX_FLAT_RESULTS = 1) and Pointer Fallback

Passing values in Core WebAssembly parameters and results (CPU registers) is faster than spilling everything to linear memory, but toolchains and C ABIs have hard arity limits. Therefore, flatten_functype(cx, ft) in CanonicalABI.md enforces exact scalar register limits:

MAX_FLAT_PARAMS = 16
MAX_FLAT_ASYNC_PARAMS = 4
MAX_FLAT_RESULTS = 1

def flatten_functype(cx, ft):
  flat_params = flatten_types(cx.reverse_direction(), ft.param_types())
  flat_results = flatten_types(cx, ft.result_type())
  if not cx.opts.async_:
    if len(flat_params) > MAX_FLAT_PARAMS:
      flat_params = [cx.opts.memory.ptr_type()]
    if len(flat_results) > MAX_FLAT_RESULTS:
      match cx.direction:
        case 'lift':
          flat_results = [cx.opts.memory.ptr_type()]
        case 'lower':
          flat_params += [cx.opts.memory.ptr_type()]
          flat_results = []
    return CoreFuncType(flat_params, flat_results)

Let us trace what happens when a synchronous WIT function signature exceeds these thresholds:

  1. When Flattened Parameters Exceed MAX_FLAT_PARAMS (16 core scalars, or 4 for async-lowered calls): Instead of passing $17+$ core arguments, the entire parameter list is treated as a single tuple stored in linear memory, and the core function takes a single i32 (or i64) pointer parameter ([ptr_type()]).
  2. When Flattened Results Exceed MAX_FLAT_RESULTS (1 core scalar)—for example, returning a string (['i32', 'i32']) or a result<list<u8>, string> (['i32', 'i32', 'i32']): * On canon lift (Component Export): The exported core function returns a single i32 pointer ([ptr_type()]) pointing to a return-area struct inside the callee's linear memory. After the host lifts the return values out of that struct, it invokes the optional (post-return $fn) callback so the callee can free any dynamically allocated buffers inside the return struct. * On canon lower (Component Import): The caller allocates a return buffer on its own linear shadow stack and passes its address as an extra trailing i32 parameter (flat_params += [ptr_type()], flat_results = [], commonly known as retptr). The host lowers the callee's result directly into the caller-supplied retptr address!
  3. Variant Join Flattening (join rule): When flattening a variant (such as result<f64, u32>), the discriminant is always an 'i32', followed by the element-wise type join of all case payloads: joining 'i32' with 'f32' yields 'i32'; joining any 32-bit type ('i32' or 'f32') with any 64-bit type ('i64' or 'f64') widens the slot to 'i64'.

How cabi_realloc and Cross-Encoding String Transcoding Work

Whenever the Canonical ABI lowers variable-length data (string or list<T>) into a destination component's linear memory, it invokes the component's exported (realloc $fn) callback (cabi_realloc) with four i32 (or i64) arguments:

;; Canonical ABI realloc signature:
;; (old_ptr, old_byte_length, alignment, new_byte_length) -> new_ptr
(func (export "cabi_realloc")
  (param $old_ptr i32)
  (param $old_size i32)
  (param $align i32)
  (param $new_size i32)
  (result i32)
  ...
)

Before executing cabi_realloc, the runtime sets ComponentInstance.may_leave = False—meaning if the guest code inside cabi_realloc attempts to make a reentrant cross-component call while the host is halfway through writing lowered arguments into its memory, the runtime immediately traps and locks down the Store (Store.lock_down()). Once cabi_realloc returns ptr, the Canonical ABI verifies two safety invariants before copying a single byte:

  • trap_if(ptr != align_to(ptr, alignment)) (the returned pointer must obey the exact power-of-two alignment).
  • trap_if(ptr + new_byte_length > len(cx.opts.memory)) (the allocation range must lie completely within the currently grown linear memory bounds).

Furthermore, because each canon lift and canon lower declaration declares its own string-encoding option (utf8 0x00, utf16 0x01, or latin1+utf16 0x02), the Canonical ABI transcodes strings on the fly between components:

  • For latin1+utf16, the high bit of the length word (UTF16_TAG = 1 << 31 = 0x80000000 in 32-bit memory) acts as a dynamic encoding discriminator: when clear, the buffer contains 1-byte Latin-1 code units; when set, the buffer contains 2-byte UTF-16LE code units of length tagged_code_units ^ (1 << 31).
  • When transcoding an unknown string into latin1+utf16 (store_string_to_latin1_or_utf16 in CanonicalABI.md), the runtime optimistically allocates 1 byte per code unit (aligned to 2 bytes) and writes Latin-1 bytes until it encounters a Unicode scalar value $\ge 256$ (1 << 8), at which point it calls cabi_realloc(ptr, src_code_units, 2, 2 * src_code_units) to double the buffer in place, expands the already-written Latin-1 prefix bytes to 16-bit little-endian words, encodes the remainder as UTF-16LE, shrinks any excess capacity via a final cabi_realloc, and sets the UTF16_TAG bit!

7. WASI 0.2 (Preview 2) System Interface Architecture: Capability-Based Security, wasi:cli/command@0.2.8, and wasi:http/proxy@0.2.8

WASI 0.2 (standardized in the WebAssembly/WASI, wasi-cli, and wasi-http repositories at version 0.2.0 through 0.2.8) eliminates the ambient POSIX authority of traditional operating systems. In a conventional Linux container, any npm or PyPI dependency running inside the process can invoke open("/etc/passwd") or connect to 169.254.169.254 unless blocked by an external seccomp/AppArmor policy. In WASI 0.2, system calls do not exist: a component has zero access to the filesystem, network sockets, environment variables, system clocks, or standard streams unless the host explicitly links those WIT interfaces and passes capability resource handles at instantiation time.

The Two Canonical WASI 0.2 Worlds: wasi:cli/command and wasi:http/proxy

As verified directly from the official WASI WIT specifications (https://raw.githubusercontent.com/WebAssembly/wasi-cli/main/wit/command.wit, https://raw.githubusercontent.com/WebAssembly/wasi-cli/main/wit/imports.wit, https://raw.githubusercontent.com/WebAssembly/wasi-http/main/wit/proxy.wit, and https://raw.githubusercontent.com/WebAssembly/wasi-http/main/wit/handler.wit), WASI 0.2 defines two primary deployment worlds:

1. wasi:cli/command@0.2.8 (Command-Line & Batch Workloads)

package wasi:cli@0.2.8;

@since(version = 0.2.0)
world imports {
  include wasi:clocks/imports@0.2.8;
  include wasi:filesystem/imports@0.2.8;
  include wasi:sockets/imports@0.2.8;
  include wasi:random/imports@0.2.8;
  include wasi:io/imports@0.2.8;

  import environment;
  import exit;
  import stdin;
  import stdout;
  import stderr;
  import terminal-input;
  import terminal-output;
  import terminal-stdin;
  import terminal-stdout;
  import terminal-stderr;
}

@since(version = 0.2.0)
world command {
  include imports;
  export run;
}

Where wasi:cli/run@0.2.0 exports a single entry point run: func() -> result; and wasi:cli/environment@0.2.0 provides explicit capability queries:

  • get-environment: func() -> list<tuple<string, string>>;
  • get-arguments: func() -> list<string>;
  • initial-cwd: func() -> option<string>;

Notice also how Wasmtime hardens terminal output (https://docs.wasmtime.dev/security.html): when a guest component writes to stdout or stderr connected to a host terminal, Wasmtime automatically filters and translates raw ANSI escape sequences into inert replacement sequences so untrusted guest code cannot inject terminal control commands into the developer's shell.

2. wasi:http/proxy@0.2.8 (Serverless Edge & HTTP Microservices)

package wasi:http@0.2.8;

@since(version = 0.2.0)
world imports {
  import wasi:clocks/monotonic-clock@0.2.8;
  import wasi:clocks/wall-clock@0.2.8;
  import wasi:random/random@0.2.8;
  import wasi:cli/stdout@0.2.8;
  import wasi:cli/stderr@0.2.8;
  import wasi:cli/stdin@0.2.8;
  import outgoing-handler;
}

@since(version = 0.2.0)
world proxy {
  include imports;
  export incoming-handler;
}

Look closely at what is absent from wasi:http/proxy:

  • Zero Filesystem Access (wasi:filesystem is not included): An HTTP proxy component cannot read or write the host disk by construction.
  • Zero Raw TCP/UDP Socket Access (wasi:sockets is not included): The component can only make outbound HTTP requests through wasi:http/outgoing-handler.handle(request: outgoing-request, options: option<request-options>) -> result<future-incoming-response, error-code>, allowing the host runtime to enforce domain allowlists, mutual TLS (mTLS), and egress rate limits transparently.
  • Streaming Response Capability via response-outparam: In wasi:http/incoming-handler, the exported signature is handle: func(request: incoming-request, response-out: response-outparam);. Rather than buffering an entire multi-megabyte HTTP response in linear memory before returning, the component calls response-outparam.set to send the HTTP status and headers immediately, and then streams chunks directly into the outgoing-body wasi:io/streams.output-stream while continuing background computation!

8. Production Runtime Execution & Sandboxing in Wasmtime: Cranelift AOT/JIT, Spectre Mitigations, Deterministic Fuel vs. Epoch Interruption, and Component Tooling

When deploying WebAssembly components in multi-tenant production environments using Wasmtime (https://docs.wasmtime.dev/security.html and https://docs.wasmtime.dev/examples-interrupting-wasm.html), systems engineers must configure three critical execution controls:

1. Bounding CPU Execution: Deterministic Fuel vs. Non-Deterministic Epochs

Because the Halting Problem makes it impossible to prove statically that an arbitrary guest component will terminate, a host runtime must be able to preempt infinite loops or CPU-exhaustion attacks. As documented in Wasmtime's Interrupting Wasm Execution guide (https://docs.wasmtime.dev/examples-interrupting-wasm.html), Wasmtime provides two orthogonal mechanisms—each configurable to either raise a non-resumable Trap::OutOfFuel / epoch trap or trigger an async yield back to the host event loop:

Preemption Mechanism Wasmtime API Configuration Determinism Guarantee Runtime Overhead & Best Use Case
Deterministic Fuel config.consume_fuel(true), store.set_fuel(N), config.fuel_async_yield_interval(...) 100% Deterministic (when config.memory_init_cow(false) is set across platforms): the exact same input and fuel budget always interrupts at the exact same instruction boundary. Higher CPU overhead (Cranelift instruments basic blocks to decrement fuel counters). Ideal for smart contracts, deterministic replay, and per-instruction billing.
Non-Deterministic Epochs config.epoch_interruption(true), store.set_epoch_deadline(ticks), engine.increment_epoch() Wall-Clock / Timer Driven (Non-Deterministic): a background host timer thread calls engine.increment_epoch() at fixed intervals (e.g., every 10ms). ~10% execution slowdown (measured by Wasmtime docs)—substantially faster than fuel. Ideal for serverless HTTP SLA timeouts and multi-tenant plugin sandboxes.

2. Hardware Speculative Execution (Spectre) Mitigations in Cranelift

As detailed in Wasmtime's security specification (https://docs.wasmtime.dev/security.html), when executing untrusted guest components inside the same host OS process, hardware speculative execution (Spectre v1 / Bounds Check Bypass) must be mitigated at control-flow and memory boundaries:

  • Indirect Function Table Bounds (call_indirect): Cranelift emits speculative execution barriers on function table index bounds checks so an attacker cannot speculatively index past the end of a table instance.
  • Switch Table Dispatch (br_table): Speculation on br_table branch targets is constrained to a deterministic location.
  • Dynamic Linear Memories: When static virtual memory guard pages are disabled (dynamic memory configuration), Cranelift automatically inserts Spectre mitigations on every explicit software memory bounds check. (On aarch64, the csdb instruction can be additionally toggled via the use_csdb Cranelift flag when strict speculative serialization is required.)
  • Instance Memory Zeroing on Drop: Wasmtime zeros linear memories, tables, and instance metadata upon teardown before returning backing buffers to pooling allocators, preventing cross-tenant data leakage even in the presence of upstream embedding bugs.

3. Building and Serving a WASI 0.2 HTTP Proxy Component in Rust

Below is a complete, production-ready pattern for compiling a Rust WASI 0.2 HTTP proxy component (wasm32-wasip2 target) that implements wasi:http/proxy@0.2.8 and serving it via wasmtime serve:

// src/lib.rs — WASI 0.2 HTTP Proxy Component targeting `wasm32-wasip2`
use wasi::http::types::{
    Fields, IncomingRequest, OutgoingBody, OutgoingResponse, ResponseOutparam,
};

struct EdgeProxyComponent;

impl wasi::exports::http::incoming_handler::Guest for EdgeProxyComponent {
    fn handle(request: IncomingRequest, response_out: ResponseOutparam) {
        let path = request.path_with_query().unwrap_or_else(|| String::from("/"));

        let headers = Fields::new();
        let _ = headers.set(
            &String::from("content-type"),
            &[b"application/json; charset=utf-8".to_vec()],
        );

        let response = OutgoingResponse::new(headers);
        let _ = response.set_status_code(200);

        let body = response.body().expect("outgoing response body capability");
        // Stream response headers immediately before writing body chunks
        ResponseOutparam::set(response_out, Ok(response));

        let out_stream = body.write().expect("wasi:io/streams output-stream");
        let payload = format!(
            "{{\"status\":\"ok\",\"wasi_version\":\"0.2.8\",\"path\":{:?}}}",
            path
        );
        let _ = out_stream.blocking_write_and_flush(payload.as_bytes());
        drop(out_stream);
        let _ = OutgoingBody::finish(body, None);
    }
}

wasi::http::proxy::export!(EdgeProxyComponent);

To compile, inspect the binary component sections and embedded WIT world, and run the component inside Wasmtime's capability sandbox:

# 1. Install the native Rust WASI 0.2 Component target (wasm32-wasip2)
rustup target add wasm32-wasip2

# 2. Build the self-contained WebAssembly Component (.wasm with layer 0x01 0x00)
cargo build --target wasm32-wasip2 --release

# 3. Verify the 8-byte Component preamble (00 61 73 6d 0d 00 01 00) and inspect WIT
wasm-tools validate target/wasm32-wasip2/release/edge_proxy.wasm
wasm-tools component wit target/wasm32-wasip2/release/edge_proxy.wasm

# 4. Serve the WASI 0.2 HTTP Proxy Component with zero filesystem or raw socket capabilities
wasmtime serve -Scommon target/wasm32-wasip2/release/edge_proxy.wasm

9. Frequently Asked Questions (FAQ)

How do I tell whether a .wasm binary file is a Core WebAssembly Module or a WebAssembly Component? Inspect the first 8 bytes of the file. Both formats begin with the 4-byte magic number 0x00 0x61 0x73 0x6D (\0asm). Bytes 4..7 distinguish the format via the 16-bit version and 16-bit layer fields (https://raw.githubusercontent.com/WebAssembly/component-model/main/design/mvp/Binary.md): a Core WebAssembly Module has bytes 0x01 0x00 0x00 0x00 (version 1, layer 0), whereas a WebAssembly Component has bytes 0x0d 0x00 0x01 0x00 (component version 0x0d, layer 1). You can also run wasm-tools objdump <file.wasm> or wasm-tools component wit <file.wasm> to inspect the component section headers (section_1 through section_12).

Why are Core WebAssembly Section IDs 12 (Data Count) and 13 (Tag) encoded out of numerical order in a valid .wasm binary? In the original WebAssembly 1.0 specification, non-custom sections 1 through 11 appeared in strictly ascending numerical order (Type=1 through Data=11). When bulk-memory instructions (memory.init and data.drop) were standardized, single-pass streaming compilers needed to know how many data segments existed before validating instruction bodies in Code Section (10), because Data Section (11) is placed at the very end of the binary. Therefore, Data Count Section (12) was assigned the next available ID (12) but placed structurally immediately before Code Section (10). Similarly, when Wasm 3.0 exception handling introduced Tag Section (13), tags had to be declared before globals and function bodies that reference them, so Section 13 is placed between Memory Section (5) and Global Section (6) (https://webassembly.github.io/spec/core/binary/modules.html).

What happens in the Canonical ABI when a WIT function takes more than 16 flattened parameters or returns a multi-word type like string or result<T, E>? According to flatten_functype in CanonicalABI.md, the Canonical ABI defines MAX_FLAT_PARAMS = 16 (or MAX_FLAT_ASYNC_PARAMS = 4 for async-lowered calls) and MAX_FLAT_RESULTS = 1. When the flattened core parameter list exceeds 16 scalars, the parameters are written into a contiguous tuple in linear memory and the core function signature collapses to a single i32 (or i64) pointer parameter ([ptr_type()]). When a synchronous function's flattened return type exceeds 1 scalar (for example, string, which flattens to ['i32', 'i32']), canon lift (export) returns a single i32 pointer to a return struct in the callee's linear memory, whereas canon lower (import) appends an extra trailing i32 retptr parameter to the core function's parameter list and changes the core return signature to [] (void).

How does the WebAssembly Component Model prevent dangling borrowed resource handles (borrow<R>) across cross-component calls? The Component Model enforces borrow lifetime safety through a combination of static type validation and dynamic handle-table bookkeeping (CanonicalABI.md). Statically, component validation rejects any functype whose result type transitively contains a borrow<R>, and rejects any stream, future, or map value type that transitively contains a borrow<R>. Dynamically, when a caller lends a resource handle to a callee, Subtask.add_lender increments lending_handle.num_lends (preventing the caller from dropping the underlying own<R> while lent) and Task.num_borrows tracks active lowered borrows inside the callee. If the callee attempts to return (Task.return_) or cancel (Task.cancel) while self.num_borrows > 0—meaning it failed to call (canon resource.drop) on every received borrow<R> handle—the runtime immediately raises a trap (trap_if(self.num_borrows > 0)).

Should I use Wasmtime Deterministic Fuel or Epoch Interruption to enforce CPU execution timeouts in production? Use Epoch Interruption (config.epoch_interruption(true) with store.set_epoch_deadline(...)) for latency-bound serverless functions, HTTP proxies (wasi:http/proxy), and general multi-tenant plugin sandboxes: as measured in the official Wasmtime documentation (https://docs.wasmtime.dev/examples-interrupting-wasm.html), epoch checking adds only around a 10% execution slowdown because compiled code simply checks a shared epoch counter at loop headers and function prologues while a background host thread increments the epoch on a wall-clock timer. Use Deterministic Fuel (config.consume_fuel(true) with config.memory_init_cow(false)) when you require bit-for-bit instruction-count determinism across machines—such as blockchain smart-contract execution, deterministic simulation testing, or fine-grained compute metering.


10. Official Specifications & Primary Technical Sources

  1. W3C WebAssembly Core Specification (Release 3.0 — W3C Candidate Recommendation Draft, 24 November 2026): https://www.w3.org/TR/wasm-core-2/
  2. WebAssembly 3.0 Binary Format — Modules & Section IDs (0–13): https://webassembly.github.io/spec/core/binary/modules.html
  3. WebAssembly 3.0 Binary Format — Value Types, Heap Types, Recursive Types & Memory64 Limits: https://webassembly.github.io/spec/core/binary/types.html
  4. WebAssembly 3.0 Binary Format — LEB128 Variable-Length Integer Encoding Rules (ceil(N / 7)): https://webassembly.github.io/spec/core/binary/values.html
  5. WebAssembly 3.0 Execution — Runtime Structure, Store, Stack Frames & 65,536-Byte (64 KiB) Page Size: https://webassembly.github.io/spec/core/exec/runtime.html
  6. WebAssembly Component Model — Official WIT (Wasm Interface Types) Design & Reference (Bytecode Alliance): https://component-model.bytecodealliance.org/design/wit.html
  7. WebAssembly Component Model — Binary Format Specification (0x0d 0x00 0x01 0x00 Preamble & Sections 0–12): https://raw.githubusercontent.com/WebAssembly/component-model/main/design/mvp/Binary.md
  8. WebAssembly Component Model — Canonical ABI Specification (alignment, elem_size, MAX_FLAT_PARAMS = 16, cabi_realloc, String Transcoding & Resource Handle Tables): https://raw.githubusercontent.com/WebAssembly/component-model/main/design/mvp/CanonicalABI.md
  9. WASI 0.2 (wasi:http@0.2.8) Official Proxy World & Incoming/Outgoing Handler WIT Specifications: https://raw.githubusercontent.com/WebAssembly/wasi-http/main/wit/proxy.wit
  10. WASI 0.2 (wasi:cli@0.2.8) Official Command & Imports World WIT Specifications: https://raw.githubusercontent.com/WebAssembly/wasi-cli/main/wit/imports.wit
  11. Wasmtime Official Security Architecture (2GB Guard Regions, Spectre Mitigations & Terminal Escape Filtering) and Execution Interruption (10% Epoch Overhead vs. Deterministic Fuel): https://docs.wasmtime.dev/security.html
  12. Wasmtime Official Guide to Interrupting WebAssembly Execution (Fuel vs. Epochs): https://docs.wasmtime.dev/examples-interrupting-wasm.html
🔗 Share Post

Reading next story...

Back to Feed