global.get
Read a global.
core0x23
Syntax
global.get
Stack Effect
[] -> [global type]Opcode
- Hex
0x23- Decimal
35- Bytes
[0x23]- Encoding
0x23 <globalidx:u32-leb128>- Immediates
globalidx: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
;; global.get example
)