Mode:
Duration:
1
2
3
4
5
6
7
8
# wat/demo/add.wat
(module
(func $add (param $a i32) (param $b i32) (result i32)
local.get $a
local.get $b
i32.add)
(export "add" (func $add))
)Coding works best on desktop or with an external keyboard.
# wat/demo/add.wat
(module
(func $add (param $a i32) (param $b i32) (result i32)
local.get $a
local.get $b
i32.add)
(export "add" (func $add))
)Coding works best on desktop or with an external keyboard.
A basic WebAssembly Text Format (WAT) module that adds two numbers.
# wat/demo/add.wat
(module
(func $add (param $a i32) (param $b i32) (result i32)
local.get $a
local.get $b
i32.add)
(export "add" (func $add))
)WAT (WebAssembly Text Format) is the human-readable, assembly-like syntax used to represent WebAssembly binaries. It allows developers to write, inspect, debug, and understand Wasm modules using a clear, text-based format before compiling to .wasm.
Origin & Creator
WebAssembly was created by engineers from Mozilla, Google, Microsoft, and Apple. WAT is part of the core WebAssembly specification managed by the W3C WebAssembly Community Group.
Industrial Note
WAT is essential for low-level debugging, reverse engineering, creating minimal Wasm modules, and understanding how higher-level languages compile to WebAssembly.