-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
Hi,
Thanks for this really interesting library. This is a great step for writing code that can run in the browser and in a python backend!
I was wondering if you can share an example of how to compile WebAssembly so it's loadable by python-ext-wasm. I know this issue might be unrelated to this library.
I tried this:
- install the
assemblyscript
npm package - start a new assemblyscript project:
npx asinit sometest
- build the index.ts file using
npm run-script asbuild
When I try to load the file I keep getting:
Traceback (most recent call last):
File "tests/wasm/test.py", line 7, in <module>
wasm = Instance(code)
RuntimeError: Failed to instantiate the module:
link error: Import not found, namespace: env, name: abort
It looks like it's related to "Support imports (needs #28)" but I'm confused by your example which doesn't do anything with imports.
from wasmer import Instance
wasm = Instance(open('yourscript.wasm', 'rb').read())
from wasmbind import Module
module = Module(wasm)
Could you share a some info on how to create a proper .wasm file?
Thanks a lot!
Metadata
Metadata
Assignees
Labels
No labels