Converting WAST into WASM
Learn how to convert WAST into WASM using the wat2wasm command.
We'll cover the following...
We'll cover the following...
The wat2wsam
wat2wasm helps to convert the WAST format into WASM. Let’s take it for a spin:
Create a new folder called
wabt-playgroundand go into the folder:
mkdir wabt-playgroundcd wabt-playground
Create a
.watfile calledadd.wat:
touch add.wat
Add the following contents to
add.wat:
(module(func $add (param $lhs i32) (param $rhs i32) (result i32)local.get $lhslocal.get $rhsi32.add))