-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Description
Context
I have compiled a WASIX version of busybox, but I (and claude) struggle to get it running in Wasmer (7 alpha 2) due to a serialization error. Maybe you could share your expertise ?
Full Busybox-WASIX Repo & Reproduction
https://github.com/MentalGear/busybox-wasm-wasi/tree/claude/wasix-only-1bTRo#busybox-wasix
--- General Wasmer Issue Report ---
Environment
@wasmer/sdkversion: 0.10.0 (regression from 0.9.0)- Platform: Linux/macOS
Description
When using runWasix() with a local WASM file (WASIX-compiled BusyBox), the SDK fails with:
panicked at src/tasks/task_wasm.rs:38:43:
called `Result::unwrap()` on an `Err` value: Generic("Not able to serialize module")
Followed by:
RuntimeError: unreachable
at wasmer_js_bg.wasm:0x417b11
Version Comparison
| Version | Behavior |
|---|---|
| 0.9.0 | No panic, but exit code: 1 with no output (args issue?) |
| 0.10.0 | Panics with "Not able to serialize module" |
Steps to Reproduce
- Compile a WASIX module (e.g., BusyBox with wasix-libc)
- Serve it with Cross-Origin Isolation headers
- Load and run with
runWasix():
import { init, runWasix } from '@wasmer/sdk';
await init();
const response = await fetch('./busybox-wasix.wasm');
const wasmBytes = new Uint8Array(await response.arrayBuffer());
const instance = await runWasix(wasmBytes, {
args: ['busybox', 'echo', 'hello'],
env: { 'HOME': '/', 'PATH': '/bin' }
});
const result = await instance.wait(); // <-- Error thrown hereExpected Behavior
The WASM module should execute and return output.
Actual Behavior
The SDK panics at src/tasks/task_wasm.rs:38:43 with "Not able to serialize module".
Additional Context
- Cross-Origin Isolation is enabled (
crossOriginIsolated === true) - SharedArrayBuffer is available
- The same WASM file runs correctly with
wasmer runCLI (v6.1.0, v7.0+) Wasmer.fromRegistry()examples work (e.g.,python/python)- The WASM file requires WASIX imports (
wasix_32v1.*), not just basic WASI
WASM Module Imports
wasix_32v1.proc_fork
wasix_32v1.fd_pipe
wasix_32v1.chdir
wasix_32v1.getcwd
wasix_32v1.thread_id
... (and wasi_snapshot_preview1.* standard imports)
Misc Console Warnings
using deprecated parameters for the initialization function; pass a single object instead
Questions
- Is running local WASIX modules supported in the browser SDK?
- Are there specific module requirements for browser compatibility?
- Does the SDK only support packages from the Wasmer Registry?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels