When calling procedures you need to marshal the data from the host to the environment and vice I have an example of host to client <https://github.com/beef331/wasm3/blob/master/tests/thosttowasm.nim>
<https://github.com/beef331/wasm3/blob/master/wasmsources/hostinterop.nim> is the wasm module that is called.