I define import with new_typed for signature fn() -> (i32, i32, i32, i32). On wasm side when I call this function, only first i32 is corrent, second one is actual third and other too is filled with random.
When I define import with Function::new(), all works as expected.
Describe the bug
I define import with
new_typed
for signaturefn() -> (i32, i32, i32, i32)
. On wasm side when I call this function, only first i32 is corrent, second one is actual third and other too is filled with random.When I define import with
Function::new()
, all works as expected.Code: https://github.com/Rulexec/wasmer-multivalue-demo/blob/5aeebc61bad481713aeaa08478d1bd59ccdc1ada/wasmer_host/src/main.rs
This wasm function does
a * 2 + b * 3 + c * 7 + d * 11
. With inputs(1, 2, 3, 4)
it prints:Rust Explorer playground
Expected behavior
I expect that typed and dynamic definition of imports will work identically.
Additional context
Ubuntu 22.04.3 LTS
Thanks.