global.set
Write a mutable global.
core0x24
Syntax
global.set
Stack Effect
[global type] -> []Opcode
- Hex
0x24- Decimal
36- Bytes
[0x24]- Encoding
0x24 <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.set example
)