so I have the following import in my generated .wast file (disclaimer: I have not written the wasm file myself):
(import "index" "bigDecimal.fromString" (func $fimport$1 (param i32) (result i32)))
and I need to write up the host import function in Rust. I cannot use &str in Rust but also the import requires an i32. I'm guessing I need to pass a pointer to a string, defined in Rust? Can anyone point me to the right direction? Some example of that being done in wasmtime?
let from_string = Func::wrap(&store, |a: i32| {
println!("a={}", a);
});
Thanks a ton in advance!