We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I can't load the py2wasm generated file with wasmer-js.
def talk(message): return "Talk " + message def main(): print(talk("Hello World")) if __name__ == "__main__": main()
py2wasm hello.py -o myprogram.wasm
import { init, WASI } from '@wasmer/wasi'; async function load(){ const moduleBytes = fetch('myprogram.wasm'); const module = await WebAssembly.instantiateStreaming(moduleBytes); // -> Error await init(); const wasi = new WASI({ env: { }, args: [ ], }); await wasi.instantiate(module, {}); const exitCode = wasi.start(); const stdout = wasi.getStdoutString(); console.log(`${stdout}(exit code: ${exitCode})`); }
Uncaught (in promise) TypeError: WebAssembly.instantiate(): Imports argument must be present and must be an object
wasmer run myprogram.wasm Talk Hello World
The text was updated successfully, but these errors were encountered:
Hey @magulyas , you should try to use @wasmer/sdk, not the deprecated @wasmer/wasi.
@wasmer/sdk
@wasmer/wasi
Sorry, something went wrong.
Hi @syrusakbary, This issue is independent from @wasmer/wasi. It's coming from WebAssembly.instantiate() function.
No branches or pull requests
Issue
I can't load the py2wasm generated file with wasmer-js.
hello.py
Compiling
Browser side code
Error (Chrome console)
Uncaught (in promise) TypeError: WebAssembly.instantiate(): Imports argument must be present and must be an object
Test with wasmer
The text was updated successfully, but these errors were encountered: