---
typeId: req
recordId: benac-exec-002
fields:
  title: WASM package-host calling convention
  statement: >-
    Benac shall define a versioned WASM package-host calling convention for package
    interfaces that reference WASM artifacts.

    The calling convention shall define module format, allowed imports, forbidden
    imports, required exports, memory behavior, input encoding, output encoding, error
    behavior, resource behavior, and conformance vectors.

    The calling convention shall describe how a Station mediates package-visible WASM
    artifact use.

    The calling convention shall not classify packages.

    The calling convention shall not classify how package work is performed.

    A Station shall attempt a WASM-backed package operation only when Local Policy
    grants the required capabilities, required artifacts are available, resource
    requirements are satisfied, and the Station can mediate the attempt.
  rationale: >-
    WASM interoperability requires a shared package-host calling convention, not a
    package class.
  verification: >-
    WASM conformance packages for greeting, calculator, todo reducer, invalid output,
    forbidden import, and resource-limit behavior produce equivalent results and
    diagnostics across conforming implementations when required grants, artifacts, and
    resources are present.
  testable: true
  status: draft
  area: BENAC-EXEC
  sourceDocument: user-requested schema-first requirements cleanup
  sourceVersion: 2026-05-06
  sourceSections:
    - Execution model and package host interface
  order: 99
---
