Watusi: A WebAssembly Text (WAT) to Binary (WASM) converter.
Summary
Functions
Converts WebAssembly Text (WAT) source to a WebAssembly Binary (WASM).
Functions
Converts WebAssembly Text (WAT) source to a WebAssembly Binary (WASM).
Supports both string input and IOData.
Options
:debug_names- Iftrue, includes a 'name' custom section in the binary containing symbolic identifiers from the WAT source. Defaults tofalse.
Examples
iex> wat = "(module (func (export \"main\") (result i32) i32.const 42))"
iex> wasm = Watusi.to_wasm(wat)
iex> <<0, 97, 115, 109, 1, 0, 0, 0>> <> rest = wasm
iex> byte_size(rest) > 0
true