{
  "id": "wasm-spectec",
  "name": "Wasm SpecTec",
  "aka": [
    "SpecTec",
    "WebAssembly SpecTec"
  ],
  "summary": "The language in which the official WebAssembly specification has been written since 2025. From one source it generates the spec document and an interpreter that runs the official tests.",
  "details": "SpecTec is not tied to a proof assistant. Backends that generate Rocq, Isabelle and Lean 4 definitions exist only in development branches of the SpecTec repository and are not part of the official toolchain yet. The March 2025 announcement says the Rocq backend could already handle the soundness proof for the Wasm 1.0 subset, with the full language in progress.",
  "target": "wasm",
  "fragment": "The whole core specification: syntax, validation, execution, and the binary and text formats, for Wasm 1.0, 2.0 and 3.0. Not defined inside SpecTec: floating-point operations, bitwise integer operations (and, shifts, popcount and similar), conversions and byte encodings. These are declared as built-ins and specified in the prose and math of the document (floats by reference to IEEE 754). The JavaScript and Web embedding specs are separate documents not written in SpecTec.",
  "version": "WebAssembly 1.0, 2.0 and 3.0 (released September 2025), plus the evolving \"wasm-latest\"",
  "framework": "SpecTec (a domain-specific language with an OCaml toolchain)",
  "provers": [],
  "open": "open-source",
  "license": "Apache-2.0 (SpecTec tool); W3C Software and Document License (specification sources)",
  "maintainers": [
    "WebAssembly Community Group (spec editors)",
    "SpecTec team (github.com/Wasm-DSL)"
  ],
  "links": {
    "homepage": "https://webassembly.github.io/spec/",
    "repo": "https://github.com/WebAssembly/spec/tree/main/spectec",
    "docs": "https://github.com/WebAssembly/spec/blob/main/spectec/README.md",
    "paper": "https://arxiv.org/abs/2311.07223"
  },
  "validation": "SpecTec generates a \"meta-interpreter\" from the same source as the spec document. The PLDI 2024 paper reports that it passed 100% of the applicable official test suite for Wasm 2.0, and the March 2025 adoption post says all applicable tests pass. The interpreter calls the reference interpreter for decoding and validation, so the tests check execution only. The spec repository runs the interpreter on the Wasm 1.0, 2.0 and 3.0 test suites in CI.",
  "stage_evidence": {
    "mechanized": {
      "met": true,
      "evidence": "https://github.com/WebAssembly/spec/tree/main/specification/wasm-3.0",
      "note": "The spec is a machine-readable SpecTec source that the SpecTec front end type-checks. It is not stated in a proof assistant in the official toolchain."
    },
    "scope_stated": {
      "met": true,
      "evidence": "https://github.com/WebAssembly/spec/tree/main/specification",
      "note": "Separate source folders for Wasm 1.0, 2.0, 3.0 and wasm-latest."
    },
    "executable": {
      "met": true,
      "evidence": "https://webassembly.org/news/2025-03-27-spectec/",
      "note": "SpecTec generates an interpreter from the specification."
    },
    "validated": {
      "met": true,
      "evidence": "https://arxiv.org/abs/2311.07223",
      "note": "100% of the applicable official Wasm 2.0 tests pass (PLDI 2024). Decoding and validation come from the reference interpreter, so only execution is tested this way."
    },
    "adopted_by_owner": {
      "met": true,
      "evidence": "https://webassembly.org/news/2025-03-27-spectec/",
      "note": "The WebAssembly Community Group voted in March 2025 to write future editions of the spec in SpecTec. Wasm 3.0 is the first version produced with it."
    },
    "full_coverage": {
      "met": true,
      "evidence": "https://github.com/WebAssembly/spec/blob/main/specification/wasm-3.0/3.1-numerics.scalar.spectec",
      "note": "Covers all of the Wasm 3.0 core spec. Exclusions: float, bitwise and conversion primitives are built-ins (a TODO in the source says to implement numerics internally); the JS and Web embedding specs are not in SpecTec."
    },
    "tracks_versions": {
      "met": true,
      "evidence": "https://webassembly.org/news/2025-03-27-spectec/",
      "note": "New editions of the standard are written in SpecTec, so the model and the standard change together."
    }
  },
  "features": {
    "wasm.control": {
      "status": "full",
      "source": "https://github.com/WebAssembly/spec/blob/main/specification/wasm-3.0/4.3-execution.instructions.spectec"
    },
    "wasm.memory": {
      "status": "full",
      "note": "Includes the Wasm 3.0 additions (multiple memories and 64-bit addresses).",
      "source": "https://webassembly.org/news/2025-09-17-wasm-3.0/"
    },
    "wasm.tables": {
      "status": "full",
      "source": "https://github.com/WebAssembly/spec/blob/main/specification/wasm-3.0/4.3-execution.instructions.spectec"
    },
    "wasm.simd": {
      "status": "full",
      "note": "Vector and relaxed-SIMD instructions are specified. Like scalar code, they rely on the float and bitwise primitives that are left to built-ins.",
      "source": "https://github.com/WebAssembly/spec/blob/main/specification/wasm-3.0/3.2-numerics.vector.spectec"
    },
    "wasm.gc": {
      "status": "full",
      "note": "Reference types and the Wasm 3.0 garbage-collection types are specified.",
      "source": "https://webassembly.org/news/2025-09-17-wasm-3.0/"
    }
  },
  "last_release": {
    "version": "wg-3.0",
    "date": "2025-09-26",
    "source": "https://github.com/WebAssembly/spec/tags"
  },
  "last_commit": {
    "date": "2026-11-26",
    "source": "https://github.com/WebAssembly/spec/commits/main"
  },
  "last_checked": "2026-11-26",
  "attestation": "maintainer",
  "claimed_by_authors": false,
  "sources": [
    {
      "url": "https://webassembly.org/news/2025-03-27-spectec/",
      "title": "SpecTec has been adopted (WebAssembly news, 2025-03-27)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://webassembly.org/news/2025-09-17-wasm-3.0/",
      "title": "Wasm 3.0 Completed (WebAssembly news)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://arxiv.org/abs/2311.07223",
      "title": "Youn et al., Bringing the WebAssembly Standard up to Speed with SpecTec (PLDI 2024)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/WebAssembly/spec/blob/main/spectec/README.md",
      "title": "SpecTec README in the spec repository",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/WebAssembly/spec/blob/main/spectec/test-interpreter/TEST.md",
      "title": "SpecTec interpreter test run on Wasm 1.0/2.0/3.0 test suites",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/WebAssembly/spec/blob/main/LICENSE",
      "title": "Licenses per directory of the spec repository",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/Wasm-DSL/spectec/pull/207",
      "title": "Rocq backend (development pull request, not meant to be merged)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/Wasm-DSL/spectec/pull/192",
      "title": "Lean 4 backend (development pull request, not meant to be merged)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/Wasm-DSL/spectec/pull/234",
      "title": "Mechanization backend, stable branch (not meant to be merged)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/Wasm-DSL/spectec/tree/isabelle-mech-backend",
      "title": "Isabelle backend development branch",
      "accessed": "2026-11-26"
    }
  ],
  "computed": {
    "kind": "semantics",
    "methodology_version": "0.1",
    "built": "2026-11-26",
    "links": {
      "html": "/semantics/wasm-spectec/",
      "json": "/semantics/wasm-spectec.json",
      "markdown": "/semantics/wasm-spectec.md"
    },
    "stage": {
      "stage": 2,
      "name": "Authoritative",
      "criteria": [
        {
          "key": "mechanized",
          "stage": 0,
          "label": "Machine-checked or machine-readable definition",
          "met": true,
          "evidence": "https://github.com/WebAssembly/spec/tree/main/specification/wasm-3.0",
          "note": "The spec is a machine-readable SpecTec source that the SpecTec front end type-checks. It is not stated in a proof assistant in the official toolchain.",
          "computed": false
        },
        {
          "key": "scope_stated",
          "stage": 0,
          "label": "Fragment and version are stated",
          "met": true,
          "evidence": "https://github.com/WebAssembly/spec/tree/main/specification",
          "note": "Separate source folders for Wasm 1.0, 2.0, 3.0 and wasm-latest.",
          "computed": false
        },
        {
          "key": "executable",
          "stage": 1,
          "label": "Can be executed or tested",
          "met": true,
          "evidence": "https://webassembly.org/news/2025-03-27-spectec/",
          "note": "SpecTec generates an interpreter from the specification.",
          "computed": false
        },
        {
          "key": "validated",
          "stage": 1,
          "label": "Published results against conformance tests or real implementations",
          "met": true,
          "evidence": "https://arxiv.org/abs/2311.07223",
          "note": "100% of the applicable official Wasm 2.0 tests pass (PLDI 2024). Decoding and validation come from the reference interpreter, so only execution is tested this way.",
          "computed": false
        },
        {
          "key": "authoritative",
          "stage": 2,
          "label": "Adopted by the language or ISA owner, or covers the full current version and tracks new ones",
          "met": true,
          "evidence": "https://webassembly.org/news/2025-03-27-spectec/",
          "note": "Adopted by the owner: yes; full coverage: yes; tracks new versions: yes. The WebAssembly Community Group voted in March 2025 to write future editions of the spec in SpecTec. Wasm 3.0 is the first version produced with it. Covers all of the Wasm 3.0 core spec. Exclusions: float, bitwise and conversion primitives are built-ins (a TODO in the source says to implement numerics internally); the JS and Web embedding specs are not in SpecTec. New editions of the standard are written in SpecTec, so the model and the standard change together.",
          "computed": true
        }
      ],
      "missing_for_next": []
    },
    "used_by": []
  }
}