Are there any examples where the WebAssembly code is written in Rust rather than WAT? I'm trying to understand how to deal with linear memory, etc, which is covered by the examples, but the WAT does not translate easily or at all to Rust.
I appreciate Wasmer is agnostic of the language that the guest WASM is written in, and some of the implementation details are language specific. However, having the handful of WAT based examples in some common languages like Rust, C, Go, AssemblyScript, etc, would really lower the barrier to entry.
Additional details
Specifically, right now, I'd love an example that shows how to pass a string from a Rust host application into a Rust guest WASM module, append to the string, and return the string and print it to stdout.
I was just about to create a similar issue. I think seeing the equivalent Rust code for the WAT in the examples would go a long way to close mental gaps in understanding.
Summary
Are there any examples where the WebAssembly code is written in Rust rather than WAT? I'm trying to understand how to deal with linear memory, etc, which is covered by the examples, but the WAT does not translate easily or at all to Rust.
I appreciate Wasmer is agnostic of the language that the guest WASM is written in, and some of the implementation details are language specific. However, having the handful of WAT based examples in some common languages like Rust, C, Go, AssemblyScript, etc, would really lower the barrier to entry.
Additional details
Specifically, right now, I'd love an example that shows how to pass a string from a Rust host application into a Rust guest WASM module, append to the string, and return the string and print it to stdout.