Converting WASM into WAST
Explore how to convert WebAssembly WASM binaries into the WAST text format using the wasm2wat tool. Understand the structure of WAST output, use flags to modify output like disabling debug names, and apply the fold-exprs option for optimized expression layout. This lesson helps you debug and analyze WebAssembly code effectively.
We'll cover the following...
Sometimes, for debugging or understanding, we need to know what the WASM is doing. WABT has a wasm2wat converter. It helps to convert WASM into WAST format:
Running the previous command will convert add.wasm back into WAST format and print the output in the console.
If you want to save it as a file, you can do so by using the -o flag:
This command creates a new_add.wat file.
To check the various options supported by wasm2wat, we can run the following command:
Note: ...