Module golem_wasm_ast::core
source · Expand description
The core module contains the AST definition of a core WebAssembly module.
Modules§
Structs§
- The initial contents of a memory are zero bytes. Data segments can be used to initialize a range of memory from a static vector of bytes.
- The initial contents of a table is uninitialized. Element segments can be used to initialize a subrange of a table from a static vector of elements.
- The exports component of a module defines a set of exports that become accessible to the host environment once the module has been instantiated.
- The funcs component of a module defines a vector of functions with the following structure.
- Function types classify the signature of functions, mapping a vector of parameters to a vector of results. They are also used to classify the inputs and outputs of instructions.
- The globals component of a module defines a vector of global variables (or globals for short):
- Global types classify global variables, which hold a value and can either be mutable or immutable.
- The imports component of a module defines a set of imports that are required for instantiation.
- Limits classify the size range of resizeable storage associated with memory types and table types.
- The mems component of a module defines a vector of linear memories (or memories for short) as described by their memory type:
- Memory types classify linear memories and their size range.
- The top-level AST node representing a core WASM module
- Result types classify the result of executing instructions or functions, which is a sequence of values, written with brackets.
- The start component of a module declares the function index of a start function that is automatically invoked when the module is instantiated, after tables and memories have been initialized.
- The tables component of a module defines a vector of tables described by their table type:
- Table types classify tables over elements of reference type within a size range.
Enums§
- The core index space
- The core section nodes
- The core section types
- External types classify imports and external values with their respective types.
- Number types classify numeric values.
- Reference types classify first-class references to objects in the runtime store.
- Value types classify the individual values that WebAssembly code can compute with and the values that a variable accepts. They are either number types, vector types, or reference types.
- Vector types classify vectors of numeric values processed by vector instructions (also known as SIMD instructions, single instruction multiple data).
Traits§
- Trait to be implemented by custom Custom node types in order to provide information for the metadata feature Module::get_metadata.