Memory not shared between 2 modules #2958
Replies: 1 comment
-
Solved an issue in another way. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I have 2 modules written in rust: one is with host functions (host_module) and another one is a user module (user_module) which calls functions from host module.
host_module
user_module
Both module are compiled using
cargo build --release --target=wasm32-wasi
Also I have an app written in C and uses wasemde C SDK to run all this stuff inside wasmedge environment (main.cpp):
and a command to run it
gcc main.cpp -lwasmedge && ./a.out user_module/target/wasm32-wasi/release/user_module.wasm hello
The idea of this is to be able to pass complex data from user module to host functions.
In my example, I'm trying to pass an array.
My current issue is that when I read an array at host module side, I read just zeroes.
So obviously the memory is not shared between 2 modules.
Is there anyone who could help me with this? Would be much appreciated
Repository link for better understanding and how to run https://github.com/IgorKhomenko/wasmedge-modules-complexdata-demo
Beta Was this translation helpful? Give feedback.
All reactions