wasm3 / wasm3-rs

Rust wrapper for Wasm3, the fastest WebAssembly interpreter
MIT License
155 stars 43 forks source link

How to call host functions in wasm3 rust api? #44

Closed orangeC23 closed 2 years ago

orangeC23 commented 2 years ago

In the following wat file : test.txt

It wants to call the function assert_eq_i32 and print_input from host, how to call the host functions in wasm3 by rust api ?

vshymanskyy commented 2 years ago

I think the relevant example is this: https://github.com/wasm3/wasm3-rs/blob/df74c2a17ed8831595de43db98c406da4633e32a/examples/wasm_link.rs#L19