Skip to main content

Module instructions

Module instructions 

Source
Expand description

Schema for instructions.toml.

Structs§

ControlFrame
Control construct pushed on the control stack (block / loop / if).
Immediate
Immediate operand in the instruction encoding.
Instruction
A single WebAssembly instruction / opcode entry.
InstructionsTable
Root document: [[instructions]] array-of-tables.
StackType
Stack signature (stack-type.from / stack-type.to).
TypeExpr
Symbolic or concrete type expression in a stack slot descriptor.

Enums§

ControlKind
WebAssembly control instruction kind.
LabelTarget
Branch target for a control frame: break (end) or continue (start).
Opcode
Opcode as written in TOML: an integer (0x6A) or a two-element array ([0xFC, 17]).
StackEntry
One stack slot descriptor in stack-type.from / stack-type.to.
ValidateError
Validation error for stack-type invariants not expressible in the type system.

Constants§

INSTRUCTIONS_TOML
Raw TOML embedded at compile time from instructions.toml in the package root.

Functions§

instructions
Lazily parsed embedded instruction table.
parse_instructions_toml
Parse TOML source into an InstructionsTable.
validate_instructions_table
Validate every stack entry in the table.
validate_stack_entry
Check control-frame label invariants (loopStart, block/ifEnd).