Skip to content

Backend: Wasmtime execution harness for synthesized WIT ABI fixtures #73

Closed

Description

@biuld

Context

The aggregate WIT ABI fixtures under
crates/psrs-backend/src/mir/indirect_tests/aggregate/ validate the encoded Wasm
artifact but do not execute it, because they call an external import that has no
host implementation. Execution evidence for these shapes is therefore missing.

Scope

  • A harness that executes a synthesized component/import fixture under Wasmtime:
    either a minimal host that provides the canonical import, or a self-contained
    component that does not call out, so option/result/variant/record/list
    payloads can run and their observable result asserted.
  • Cover at least one parameter path and one result path for the mapped
    aggregates.

References

  • docs/implementation/backend/linear-memory-and-canonical-abi.md ABI-08
  • docs/design/D-04-suite-roadmap.md BE-27
  • crates/psrs-backend/src/mir/indirect_tests/aggregate/

Acceptance

The synthesized aggregate fixtures execute under Wasmtime with an asserted
observable result, not only Wasm validation.

Activity

  1. added
    gate:L6/M7Blocks runtime and the standard library (D-04 L6, M7)
    area:backendBackend: CC, MIR, Wasm encoding, WIT/ABI, WASI
    on Oct 1, 2026
  2. biuld commented on Oct 24, 2026

    @biuld
    OwnerAuthor

    Closed by #176, merged with merge commit 7a5b8da after latest-head execution check 120722743450 succeeded (2026-10-24T00:56:04Z, head 9bf1475).

    The synthesized aggregate harness executes option/result/variant, record and list parameters and results using an independent canonical host and the production allocator. Ten tests run 17 components, checking payloads and exactly one host call per component (allocator calls excluded). A retained component with the guest call removed traps at the observer, so a zero-valued main cannot hide a missing parameter call. The complete aggregate selection passes 33/33.

    Latest CI logs confirm cargo fmt --all --check and cargo test --workspace: 2366 passed, zero failed, seven ignored across 76 targets including doc-tests. Local full Clippy with warnings denied also passes after the observer addition. Retained components, hashes and the negative witness are under /tmp/psrs-aggregate-evidence. No production compiler, official library or corpus sources change; scoreboards and the ignored complete-support test were not rerun for this test-only topic.

    Acceptance: https://github.com/biuld/purescript-rs/blob/7a5b8da01941f88216053ab54de9e45d780147ad/docs/implementation/backend/linear-memory-and-canonical-abi.md#synthesized-aggregate-execution-2026-10-24 . ABI-08 remains In progress and BE-19/BE-27 remain Partial. Published runtime stays 312/340. Project status is Done; this harness topic names zero corpus first blockers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:backendBackend: CC, MIR, Wasm encoding, WIT/ABI, WASIgate:L6/M7Blocks runtime and the standard library (D-04 L6, M7)

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions