Find .wat in wasm32 compiltation

Hi! I have recently started a Rust project that I would like to ompile to wasm/wasi so I can run it with Wasmer. I am wondering if any of yall know a way that whenever I go to target/wasm32/debug/ how to get the .wat instead of the wasm? I know there is always wasm2wat in WABT, but I was wondering if Rust could save me some time. Any help is appreciated. Thanks!

As far as I know, the Rust compiler will only emit a *.wasm binary.

I don't believe there are any flags to make it emit the text format because wasm2wat is so ubiquitous, plus the *.wasm and *.wat formats are equivalent.

1 Like