-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to load large wasm modules when loading through wasi #302
Comments
I've rewritten This is what I've done: |
@syrusakbary This looks pretty critical to me since it renders the browser integration essentially unusable. Is there a workaround? |
Since the release of wasmer-js let wasi = new WASI({});
const module = await WebAssembly.compile(moduleBytes);
let importObject = wasi.getImports(module);
let instance = await WebAssembly.instantiate(module, importObject);
let exitCode = wasi.start(instance);
let stdout = wasi.getStdoutString(); |
I'm using wasmer-js for a wasi environment to run a pretty large wasm module with some parts of openssl. However I'm unable to load the module through
wasi.instantiate()
.Steps to reproduce
Currently I'm not able to provide a sample code, but trying to load a large enough wasm module on Chromium-based browser should trigger this.
Expected behavior
The module should load.
Actual behavior
There is a cryptic error in console:
Additional context
I've tried to modify the wasmer code to trace the error and found the error is from here:
https://github.com/wasmerio/wasmer/blob/2b396e0fad8118755184109ac5af770c937d66c0/lib/api/src/js/module.rs#L247-L251
The actual error caught here is:
I was not able to use any kind of
block_on
asstd::thread::park
panics in wasm.Although I'm using wasmer-js, the actual code is in the wasmer repo so I reported the issue here.
The text was updated successfully, but these errors were encountered: