WebAssembly Text

1 program Added 2026-03-13T12:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: WAT, WebAssembly Text Format, wasm-text
Provenance: commit df492c41b4 · authored 2026-03-13T00:10:07+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

4 sources · pl_id: pl/wast
LLM (this repo) · 1PldbPygmentsWikidata · Q131994277

Extensions claimed by this language

3 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.watpygmentsprimary189.8K files
.watwikidataprimary189.8K files
.wastpygmentssecondary41.1K files

Related languages

WAT (0.85)WebAssembly Text Format (0.83)WebAssembly (0.50)QFTASM (0.22)TMS320 Assembly (0.20)

LLM-contributed programs

Add Function

Provenance: commit df492c41b4 · authored 2026-03-13T00:10:07+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.wat · license: Public Domain · added: 2026-03-13T12:00:00Z
(module
  (func $add (param $lhs i32) (param $rhs i32) (result i32)
    local.get $lhs
    local.get $rhs
    i32.add)
  (export "add" (func $add))
)

Real programs from Software Heritage

2 samples mined from derived_datasets/<date>/contents/*.parquet, byte-verified against the SWH archive. Citation-grade qualified SWHIDs preserved.
fac-multi-value.wat · 3005 B · ext .wat · seen 120× in SWH
via fallback
swh:1:cnt:d39353d8fae1f25692c551ff6c50a9416dee3c0e;origin=https://github.com/Lind-Project/lind-wasm;anchor=swh:1:rev:5be4c7e80c3ee5d5092e34edf4852f1d21893d24;path=/src/wasmtime/tests/disas/fac-multi-value.wat
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
;;! target = "x86_64"

(module
  ;; Iterative factorial without locals.
  (func $pick0 (param i64) (result i64 i64)
    (local.get 0) (local.get 0)
  )
  (func $pick1 (param i64 i64) (result i64 i64 i64)
    (local.get 0) (local.get 1) (local.get 0)
  )
  (func (export "fac-ssa") (param i64) (result i64)
    (i64.const 1) (local.get 0)
    (loop $l (param i64 i64) (result i64)
      (call $pick1) (call $pick1) (i64.mul)
      (call $pick1) (i64.const 1) (i64.sub)
      (call $pick0) (i64.const 0) (i64.gt_u)
      (br_if $l)
      (drop) (return)
    )
  )
)

;; function u0:0(i64 vmctx, i64, i64) -> i64, i64 tail {
;;     gv0 = vmctx
;;     gv1 = load.i64 notrap aligned readonly gv0+8
;;     gv2 = load.i64 notrap aligned gv1
;;     stack_limit = gv2
;;
;;                                 block0(v0: i64, v1: i64, v2: i64):
;; @0040                               jump block1(v2, v2)
;;
;;                                 block1(v3: i64, v4: i64):
;; @0040                               return v3, v4
;; }
;;
;; function u0:1(i64 vmctx, i64, i64, i64) -> i64, i64, i64 tail {
;;     gv0 = vmctx
;;     gv1 = load.i64 notrap aligned readonly gv0+8
;;     gv2 = load.i64 notrap aligned gv1
;;     stack_limit = gv2
;;
;;                                 block0(v0: i64, v1: i64, v2: i64, v3: i64):
;; @0049                               jump block1(v2, v3, v2)
;;
;;                                 block1(v4: i64, v5: i64, v6: i64):
;; @0049                               return v4, v5, v6
;; }
;;
;; function u0:2(i64 vmctx, i64, i64) -> i64 tail {
;;     gv0 = vmctx
;;     gv1 = load.i64 notrap aligned readonly gv0+8
;;     gv2 = load.i64 notrap aligned gv1
;;     sig0 = (i64 vmctx, i64, i64, i64) -> i64, i64, i64 tail
;;     sig1 = (i64 vmctx, i64, i64) -> i64, i64 tail
;;     fn0 = colocated u0:1 sig0
;;     fn1 = colocated u0:0 sig1
;;     stack_limit = gv2
;;
;;                                 block0(v0: i64, v1: i64, v2: i64):
;; @004c                               v4 = iconst.i64 1
;; @0050                               jump block2(v4, v2)  ; v4 = 1
;;
;;                                 block2(v5: i64, v6: i64):
;; @0052                               v8, v9, v10 = call fn0(v0, v0, v5, v6)
;; @0054                               v11, v12, v13 = call fn0(v0, v0, v9, v10)
;; @0056                               v14 = imul v12, v13
;; @0057                               v15, v16, v17 = call fn0(v0, v0, v11, v14)
;; @0059                               v18 = iconst.i64 1
;; @005b                               v19 = isub v17, v18  ; v18 = 1
;; @005c                               v20, v21 = call fn1(v0, v0, v19)
;; @005e                               v22 = iconst.i64 0
;; @0060                               v23 = icmp ugt v21, v22  ; v22 = 0
;; @0060                               v24 = uextend.i32 v23
;; @0061                               brif v24, block2(v16, v20), block4
;;
;;                                 block4:
;; @0064                               return v16
;; }
multi-11.wat · 720 B · ext .wat · seen 120× in SWH
via fallback
swh:1:cnt:053e745d27b0e435d81d9de06db5311594dd65b0;origin=https://github.com/Lind-Project/lind-wasm;anchor=swh:1:rev:5be4c7e80c3ee5d5092e34edf4852f1d21893d24;path=/src/wasmtime/tests/disas/multi-11.wat
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
;;! target = "x86_64"

(module
  (func (export "multiLoop") (param i64) (result i64 i64)
    (local.get 0)
    ;; Fewer params than results.
    (loop (param i64) (result i64 i64)
      i64.const 42
      return)))

;; function u0:0(i64 vmctx, i64, i64) -> i64, i64 tail {
;;     gv0 = vmctx
;;     gv1 = load.i64 notrap aligned readonly gv0+8
;;     gv2 = load.i64 notrap aligned gv1
;;     stack_limit = gv2
;;
;;                                 block0(v0: i64, v1: i64, v2: i64):
;; @002b                               jump block2(v2)
;;
;;                                 block2(v5: i64):
;; @002d                               v8 = iconst.i64 42
;; @002f                               return v5, v8  ; v8 = 42
;; }

Contribute — propose a file extension

Tell us where to find evidence about WebAssembly Text (mapped to pl/wast). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/WebAssembly Text/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← WebAssembly Interface Type WebAssembly Text Format →