i32.const
Push an i32 constant.
core0x41
Syntax
i32.const
Stack Effect
[] -> [i32]Opcode
- Hex
0x41- Decimal
65- Bytes
[0x41]- Encoding
0x41 <value:s32-leb128>- Immediates
value:s32-leb128
- Category
- numeric
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
;; i32.const example
)