Wasmtime
wat.hh File Reference
#include <string_view>
#include <vector>
#include <wasmtime/conf.h>
#include <wasmtime/error.hh>
#include <wasmtime/span.hh>
#include <wasmtime/wat.h>

Go to the source code of this file.

Functions

Result< std::vector< uint8_t > > wasmtime::wat2wasm (std::string_view wat)
 Converts the WebAssembly text format into the WebAssembly binary format. More...
 

Function Documentation

◆ wat2wasm()

Result< std::vector< uint8_t > > wasmtime::wat2wasm ( std::string_view  wat)
inline

Converts the WebAssembly text format into the WebAssembly binary format.

This will parse the text format and attempt to translate it to the binary format. Note that the text parser assumes that all WebAssembly features are enabled and will parse syntax of future proposals. The exact syntax here parsed may be tweaked over time.

Returns either an error if parsing failed or the wasm binary.