1

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.

1 Answer 1

0

I don't have an answer to the exact problem and a low level primitive crates, but a common question is how to add new host functions to the WASM runtime, and use them in a FRAME-based runtime, and the answer is explained here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.