-
Notifications
You must be signed in to change notification settings - Fork 32
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
Support for dynamic linking #437
Comments
Hey @munjalpatel thanks for your question, it's a good one! :) Wasmex does currently not support dynamic linking between WASM modules. But if you're up to implement that support, I'd be happy to review a pull request. I'd be happy to give some pointers, if you want to tackle this topic. A workaround is to implement all functions in the |
Curious if this is still the case as it may limit us switching to wasmex. Happy to contribute the feature if it's not done! |
@bhelx I believe this still needs implementation. If I am reading the code correctly, I think we need to instantiate the module to link with the same wasmex/native/wasmex/src/instance.rs Line 65 in 863cb01
Reference: https://docs.wasmtime.dev/examples-rust-linking.html |
Yes, I can look into it a little bit more. Would be curious what @tessi thinks the API should be before we propose any changes. We could expose some more of the bits of linking to the caller, or we could create a datastructure that you pass and the rust code ties everything together. We do something similar in extism but we're trying to abstract away the runtime interface so that may not be appropriate here. |
thanks! Actually I already looked into @munjalpatel 's PR on the topic and love the start 💛 . I gave some inputs on API design on my review. So there is a discussion over in #596 - but I believe it shouldn't be too hard to implement either way. |
wasmtime supports dynamic linking using
—preload
. Is dynamic linking supported by this library?Example use case: https://github.com/bytecodealliance/javy#creating-and-running-a-dynamically-linked-module-on-the-cli
The text was updated successfully, but these errors were encountered: