GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Introduction
  • Structure
  • Validation
  • Execution
  • Binary Format
  • Text Format
  • Appendix
  • Embedding
  • Profiles
  • Implementation Limitations
  • Type Soundness
  • Validation Algorithm
  • Custom Sections and Annotations
  • Change History

This view

  • Original page
  • New address

GeezerVison is showing webassembly.github.io — Implementation Limitations — WebAssembly 3.0 (2026-11-04)

Implementation Limitations¶

Implementations typically impose additional restrictions on a number of aspects of a WebAssembly module or execution. These may stem from:

  • physical resource limits,

  • constraints imposed by the embedder or its environment,

  • limitations of selected implementation strategies.

This section lists allowed limitations. Where restrictions take the form of numeric limits, no minimum requirements are given, nor are the limits assumed to be concrete, fixed numbers. However, it is expected that all implementations have “reasonably” large limits to enable common applications.

Note

A conforming implementation is not allowed to leave out individual features. However, designated subsets of WebAssembly may be specified in the future.

Syntactic Limits¶

Structure¶

An implementation may impose restrictions on the following dimensions of a module:

  • the number of types in a module

  • the number of functions in a module, including imports

  • the number of tables in a module, including imports

  • the number of memories in a module, including imports

  • the number of globals in a module, including imports

  • the number of tags in a module, including imports

  • the number of element segments in a module

  • the number of data segments in a module

  • the number of imports to a module

  • the number of exports from a module

  • the number of sub types in a recursive type

  • the subtyping depth of a sub type

  • the number of fields in a structure type

  • the number of parameters in a function type

  • the number of results in a function type

  • the number of parameters in a block type

  • the number of results in a block type

  • the number of locals in a function

  • the number of instructions in a function body

  • the number of instructions in a structured control instruction

  • the number of structured control instructions in a function

  • the nesting depth of structured control instructions

  • the number of label indices in a \(\href{../syntax/instructions.html#syntax-instr-control}{\mathsf{br\_table}}\) instruction

  • the number of instructions in a constant expression

  • the number of instructions between a branch instruction and its target

  • the nesting depth of blocks between a branch instruction and its target

  • the length of the array in a \(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array{.}new\_fixed}}\) instruction

  • the length of an element segment

  • the length of a data segment

  • the length of a name

  • the range of characters in a name

If the limits of an implementation are exceeded for a given module, then the implementation may reject the validation, compilation, or instantiation of that module with an implementation-specific error.

Note

The last item allows embedders that operate in limited environments without support for Unicode to limit the names of imports and exports to common subsets like ASCII.

Binary Format¶

For a module given in binary format, additional limitations may be imposed on the following dimensions:

  • the size of a module

  • the size of any section

  • the size of an individual function’s code

  • the size of a structured control instruction

  • the size of an individual constant expression’s instruction sequence

  • the number of sections

Text Format¶

For a module given in text format, additional limitations may be imposed on the following dimensions:

  • the size of the source text

  • the size of any syntactic element

  • the size of an individual token

  • the nesting depth of folded instructions

  • the length of symbolic identifiers

  • the range of literal characters allowed in the source text

Validation¶

An implementation may defer validation of individual functions until they are first invoked.

If a function turns out to be invalid, then the invocation, and every consecutive call to the same function, results in a trap.

Note

This is to allow implementations to use interpretation or just-in-time compilation for functions. The function must still be fully validated before execution of its body begins.

Execution¶

Restrictions on the following dimensions may be imposed during execution of a WebAssembly program:

  • the number of allocated module instances

  • the number of allocated function instances

  • the number of allocated table instances

  • the number of allocated memory instances

  • the number of allocated global instances

  • the number of allocated tag instances

  • the number of allocated structure instances

  • the number of allocated array instances

  • the number of allocated exception instances

  • the size of a table instance

  • the size of a memory instance

  • the size of an array instance

  • the number of frames on the stack

  • the number of labels on the stack

  • the number of values on the stack

  • the number of handlers on the stack

  • the number of labels dropped from the stack by a branch instruction

  • the number of values dropped from the stack by a branch instruction

If the runtime limits of an implementation are exceeded during execution of a computation, then it may terminate that computation and report an implementation-specific error to the invoking code.

Some of the above limits may already be verified during validation or instantiation, in which case an implementation may report exceedance in the same manner as for syntactic limits.

Note

Concrete limits are usually not fixed but may be dependent on specifics, interdependent, vary over time, or depend on other implementation- or embedder-specific situations or events.

©2017-2025, WebAssembly Community Group.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.