Skip to content

Deduplicate shared validation in the WASM and WASI smoke runners #642

Closed

Description

@LunaStev

Problem

tools/run_wasm_smoke.mjs and tools/run_wasi_smoke.mjs have different runtime-specific behavior, but they duplicate small pieces of WebAssembly module loading and export validation. The private __wave_ export check is implemented separately in both scripts, so future changes can drift.

Scope

Extract only the common smoke-runner helpers into a small shared module.

Keep browser-specific assertions such as wave_add, wave_features, main, and exported memory in run_wasm_smoke.mjs. Keep WASI setup, preopens, imports, and wasi.start() in run_wasi_smoke.mjs.

Do not merge the two entry points or introduce a general WebAssembly runtime abstraction.

Completion criteria

  • Both runners use the same private-export validation helper.
  • Common module-loading code is shared where it does not change runner behavior.
  • Browser-specific and WASI-specific checks remain in their current entry points.
  • Existing command-line usage and success/failure behavior remain unchanged.
  • Existing WebAssembly CI continues to pass.

Related: #643

Activity

  1. added
    enhancementA request for a new feature or improvement.
    good first issueIssues that are good for newcomers or first-time contributors.
    help wantedThe issue requires extra attention or help from others.
    on Sep 15, 2026
  2. changed the title [-][Proposal]: Share common validation code between the WASM and WASI smoke runners[/-] [+]Share common validation code between the WASM and WASI smoke runners[/+] on Sep 15, 2026
  3. changed the title [-]Share common validation code between the WASM and WASI smoke runners[/-] [+]Deduplicate shared validation in the WASM and WASI smoke runners[/+] on Sep 15, 2026
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

    enhancementA request for a new feature or improvement.good first issueIssues that are good for newcomers or first-time contributors.help wantedThe issue requires extra attention or help from others.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions