Skip to content

fix(cli): restore guest Wasm C API imports - #2

Merged
theduke merged 2 commits into
mainfrom
fix/cli-embedded-wasm-c-api
Nov 19, 2026
Merged

theduke merged 2 commits into
mainfrom
fix/cli-embedded-wasm-c-api

Conversation

@theduke

@theduke theduke commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

The WASIX v2 CLI migration dropped registration for the guest wasm_c_api_v0 imports. Packages that embed QuickJS Edge.js could fail during instantiation on wasm_memory_size.

Register the existing WasmCapiRuntimeHooks in Run::machine for both direct WASIX guests and package commands. Restore the wasm-c-api feature in the standard release recipes, including V8-only, and restore the pinned C guest's success assertion.

Validation

  • Built the locked Cranelift release CLI with cranelift,wasm-c-api via mbx at bef7e60a86.
  • The pinned C fixture exited 0 and printed wasm-c-api ok. The existing WAT fixture exited 0. Both fixtures reproduce the missing import at the pinned base.
  • Frozen Hono packages passed greeting, 404, JSON echo, and repeat greeting. The pinned Next.js fixture passed request-time SSR and JavaScript asset serving.
  • Checked the standard and headless dependency graphs and dry-ran the release recipes. mbx fmt --all -- --check and git diff --check passed.
  • All five wasixv2::tests hook tests passed through mbx. The filtered CLI integration tests wasmer_run_wasix_wasm_c_api_guest and run_wasixv2_package_command_that_does_not_instantiate_is_an_error passed against the pinned binary.
  • The locked V8-only release compile check passed through mbx with --no-default-features --features v8,wasm-c-api.
  • Taplo passed for the CLI manifest after the formatting-only follow-up. Local full make lint stopped at missing yamlfmt. CI's whole-workspace Taplo also found formatting differences in the unchanged WASIX API and dylink manifests.

Candidate SHA-256 is a4d17068b7ef22fe7ff80dc250329de538b6f67b9dee206fa3f7a6204281aa83. OpenAI Codex authored the functional commit and the formatting-only follow-up. The performance binary was built before the formatting follow-up, whose parsed manifest is identical.

Register the existing Wasm C API hook on the WASIX Machine used by wasmer run. Restore the wasm-c-api feature in standard release builds and the guest smoke test’s success assertion.
@theduke
theduke marked this pull request as ready for review November 19, 2026 01:26
@theduke
theduke requested a review from syrusakbary as a code owner November 19, 2026 01:26
@theduke
theduke merged commit 3a649cf into main Nov 19, 2026
50 of 61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants