Code · 1 file
Sample WebAssembly Text (WAT) File
The human-readable text form of a WebAssembly module. Every language sample implements the same small program so you can compare them side by side.
WebAssembly text (WAT) · 304 B
WebAssembly text (WAT)
A WebAssembly text-format module exporting add(i32, i32) and is_vip(f64). Our sample.wasm is the same module compiled.
CC0 · free for any use · Verified by an independent tool · Report a problem
;; Sample WebAssembly text module — samplefiles.com
(module
(func $add (export "add") (param $a i32) (param $b i32) (result i32)
local.get $a
local.get $b
i32.add)
(func $is_vip (export "is_vip") (param $balance f64) (result i32)
local.get $balance
f64.const 10000
f64.ge))File details
Download from the command line
curl -L -o sample.wat https://files.samplefiles.com/code/wat/sample.watwget https://files.samplefiles.com/code/wat/sample.wathttps://files.samplefiles.com/code/wat/sample.watprintf '%s %s\n' e91782f8409d72be177b4bbecb51d55d72a6c0e5302dc0f42bc6236474a2dd37 sample.wat | shasum -a 256 -cOr check the download in your browser with the checksum calculator.