Return string form rust in Wasm

Hey @echojoys, thanks for looking into wasmex and sorry for being notoriously late in replying :slight_smile:

I wanted to implement multi-value returns in wasmex exactly for the use case you have (save string returns). Back then, I couldn鈥檛 because the APIs in underlying libraries/tooling just weren鈥檛 ready. But this changed in the meantime. Have a look at: wasmtime/multi.rs at main 路 bytecodealliance/wasmtime 路 GitHub Here, a tuple with two (and more) values is returned from wasm. The first part in that tuple could be the string length, the second could be the memory pointer.

I鈥檇 be happy to eventually implement support for this in wasmex - feel free to open an issue or give implementing it a try yourself if you feel like you want to contribute! :slight_smile: