You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, it is possible to call guest functions from the host with Ctx::call_with_table_index. When compiling to Wasm, Rust will instead insert the function into a table and pass a table index instead of a function pointer, so using it as a table index with that method on Ctx should work!
The guest cannot call functions on the host currently, other than through imports. If you wanted something more dynamic, you could do the equivalent of inserting function pointers into data on the Ctx and passing table indices into the guest and having a dedicated import from the host that allows invoking functions.
Let me know if you run into any issues with it and I'll help you fix it!
Hello,
I'd like to know if it is possible to do something like this in host or guest:
Thank you in advance for your help.
The text was updated successfully, but these errors were encountered: