When I read the code of the wasmtime executor, I can't understand the way to register the HostFunction to the wasm module. What is the role of the sp_wasm_interface::HostFunctionRegistry
trait? How is the parameter func
of the function register_static
passed in?
I have to solve this problem when I want to use a different wasm runtime instead of wasmtime or wasmi. However, I can't find a way to get the HostFunction's function body.