local.get
Read a local or parameter.
core0x20
Syntax
local.get
Stack Effect
[] -> [local type]Opcode
- Hex
0x20- Decimal
32- Bytes
[0x20]- Encoding
0x20 <localidx:u32-leb128>- Immediates
localidx:u32-leb128
- Category
- variable
Browser Support
Core WebAssembly instruction.
Validation Rules
- Operands and result types must match the instruction signature.
- The instruction must appear in a valid structured control context.
Common Mistakes
- Using the instruction with the wrong operand type.
- Forgetting that WAT validation is stack-typed.
(func $example
;; local.get example
)