-
-
Notifications
You must be signed in to change notification settings - Fork 671
support to bind wasm #2658
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
Comments
On a sidenote, specifying |
I think it is enough, we need to design some way to bind the import and export from wasm to as. |
There is more to this if we want to link properly. For instance, if the preloaded module has a static memory region and a heap region, besides reusing an existing / providing a shared Forget about wasi-libc btw., that's overly specific and won't really help with linking anyway. |
Guys, what's stopping this from resolving, please. We use web assembly as scripting interface for our 3D web solution. There's currently a requirement for binding to the following C API calls exposed by our runtime. How can we call those from AssemblyScript, please. What needs to be done to allow this to be possible ? Alternative approach is comms over a pipe (not implemented yet), then there would be no need for binding to C. Does AssemblyScript support connecting to a native pipe & sending/receiving over it ? |
Uh oh!
There was an error while loading. Please reload this page.
Feature suggestion
I think it will improve the software community ecology if we can support bind wasm which satisfies the requirement of linking. It means we can call c/c++(maybe other language based on LLVM like rust but I don't try it) function in assemblyscript.
How to implement in assemblyscript:
First step we can add a command line option to preload one wasm file and add it into
Program
instance and then compile wasm module.Second step maybe statement like import * as xxx from "xxx.wasm" can be supported, but it needs more effort.
I wonder if this proposal meets the roadmap of the community and if this PR can be merged into main.
How to handle multiple memory manager:
Memory.grow in wasm should be checked and it will trigger a compile-time Error.
For c/cpp, most of code will alloc memory by malloc / free / realloc in libc, so it can be resolved by using custom libc. e.g. https://github.com/WebAssembly/wasi-sdk
The text was updated successfully, but these errors were encountered: