-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
How do I configure the wasm environment so imported functions work?
If I use dlopen() and dlsym() to get the address of a function (call_test), how do I inject that function address into the wasm linear memory so when I call wasm functions they work correctly (because those wasm functions call my imported function).
Example: this Rust fn compiles down to wasm
#[no_mangle]
pub fn test(n: i32) -> i32 {
let _a = unsafe {call_test(1)}; // how do I place the dlsym address for call_test() into the wasm environment?
n
}
If there is no mechanism, and you have a moment, please consider writing out the steps to implement this and I'll do it.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels