-
Notifications
You must be signed in to change notification settings - Fork 6
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
Load/run WASM created with wit-bindgen #5
Comments
Hi, thanks for the note. I'm excited that you're looking at the project. So far this is definitely not production ready. In terms of support for I'm definitely aware of some of the limitations of the current structure of this project. I think the As to your issue with Since I haven't played with |
Hi, thanks for your quick answer! |
I’m not super active on the bytcodealliance Zulip, but I am on there. That would be a fine place for us to discuss things. |
Hello!
I am interested by loading in Java a WebAssembly created using the crate
wit_bindgen
. Actually I was looking for the Java bindings for this but I could not find any related project. As you probably already know, having this would allow to have a common WASM loaded by different languages (Python, Java, C, etc.).I run your project
wasmtime-java
(and thanks for this) with a wit-bindgen generated WASM but I encounter 2 problems:de/allocation
functions: forwasmtime-java
, the WASM file needs to have the 2 exported functions__alloc_bytes
and__dealloc_bytes
). Even this is not ideal, I temporarly added these functions (of course it would be better to use the existing wit-bindgen allocation functions)fn my_function(input: Vec<u8>) -> Vec<u8>
. I cannot find a way to load the return value. I confirm that I can "see" the expected result in the WASM memory but I dont understand how to find the correct offset of this result in memory (and the related result size in bytes). The offset returned by the function call (which is correct) does not match the good offset of the result.Could I ask your opinion about this?
Thanks!!
The text was updated successfully, but these errors were encountered: