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.wat — first linesWebAssembly text
;; 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

Size
304 B (304 bytes)
MIME type
text/plain
SHA-256
e91782f8409d72be177b4bbecb51d55d72a6c0e5302dc0f42bc6236474a2dd37
MD5
ae600fc3caaf2c0388bc34ede197f522

Download from the command line

curl -L -o sample.wat https://files.samplefiles.com/code/wat/sample.wat

Or check the download in your browser with the checksum calculator.