Expand description
The core module contains the AST definition of a core WebAssembly module.
Modules§
Structs§
- Custom
- Data
- 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.
- Data
Count - Elem
- 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.
- Export
- The exports component of a module defines a set of exports that become accessible to the host environment once the module has been instantiated.
- Expr
- Func
- The funcs component of a module defines a vector of functions with the following structure.
- Func
Code - Func
Type - 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.
- Func
Type Ref - Global
- The globals component of a module defines a vector of global variables (or globals for short):
- Global
Type - Global types classify global variables, which hold a value and can either be mutable or immutable.
- Import
- The imports component of a module defines a set of imports that are required for instantiation.
- Limits
- Limits classify the size range of resizeable storage associated with memory types and table types.
- Mem
- The mems component of a module defines a vector of linear memories (or memories for short) as described by their memory type:
- MemArg
- MemType
- Memory types classify linear memories and their size range.
- Module
- The top-level AST node representing a core WASM module
- Result
Type - Result types classify the result of executing instructions or functions, which is a sequence of values, written with brackets.
- Start
- 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.
- Table
- The tables component of a module defines a vector of tables described by their table type:
- Table
Type - Table types classify tables over elements of reference type within a size range.
Enums§
- Block
Type - Core
Index Space - The core index space
- Core
Section - The core section nodes
- Core
Section Type - The core section types
- Data
Mode - Elem
Mode - Export
Desc - Extern
Type - External types classify imports and external values with their respective types.
- FShape
- Float
Width - Half
- IShape
- Import
OrFunc - Instr
- IntWidth
- Mut
- NumOr
VecType - NumType
- Number types classify numeric values.
- RefType
- Reference types classify first-class references to objects in the runtime store.
- Shape
- Signedness
- TypeRef
- ValType
- 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.
- VecType
- Vector types classify vectors of numeric values processed by vector instructions (also known as SIMD instructions, single instruction multiple data).
- Vector
Load Shape
Traits§
- Expr
Source - Retains
Custom Section - Trait to be implemented by custom Custom node types in order to provide information for the metadata feature Module::get_metadata.
- Retains
Instructions - TryFrom
Expr Source