alexthomas1 opened issue #5266:
I am trying to calculate the host address and I found a similar issue: #2547
However, it seems like
wasmtime_linker_instantiate
takes in typewasmtime_instance_t
, but this isn't compatible withwasm_instance_exports
. Is there an updated way to get the base pointer of a module using linker? Thank you.wasm_instance_t* wasm_instance; error = wasmtime_linker_instantiate(linker, module, &wasm_instance, &trap); if (error != NULL || trap != NULL) { printf("Failed to instantiate \n"); exit(1); } wasm_extern_vec_t exports; wasm_instance_exports(wasm_instance, &exports); size_t i = 0; g_memory = get_export_memory(&exports, i++); // Run it. wasm_func_t* func; wasmtime_linker_get_default(linker, &empty, &func); if (error != NULL) exit_with_error("failed to locate default export for module", error, NULL); error = wasmtime_func_call(func, NULL, 0, NULL, 0, &trap); if (error != NULL) exit_with_error("error calling default export", error, trap);
Last updated: Nov 22 2024 at 16:03 UTC