Documentation ¶
Overview ¶
Package types defines wasm low level types.
Index ¶
- type DataSegment
- type ElementSegment
- type ExportEntry
- type External
- type FunctionBody
- type FunctionSig
- type GlobalEntry
- type GlobalVar
- type Import
- type ImportFunc
- type ImportGlobalVar
- type ImportMemory
- type ImportTable
- type Importable
- type LocalEntry
- type Memory
- type ResizableLimits
- type Table
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSegment ¶
type DataSegment struct { Index uint32 // The index into the global linear memory space, should always be 0 in the MVP. Offset []byte // initializer expression for computing the offset for placing elements, should return an i32 value Data []byte }
DataSegment an entry in data section.
type ElementSegment ¶
type ElementSegment struct { Index uint32 // The index into the global table space, should always be 0 in the MVP. Offset []byte // initializer expression for computing the offset for placing elements, should return an i32 value Elems []uint32 }
ElementSegment is an element.
type ExportEntry ¶
ExportEntry is an export entry.
type FunctionBody ¶
type FunctionBody struct { Locals []LocalEntry Code []byte }
FunctionBody is an bytes and args of a function.
type FunctionSig ¶
FunctionSig is a signature of function.
type GlobalEntry ¶
type GlobalEntry struct { Type *GlobalVar // Type holds information about the value type and mutability of the variable Init []byte // Init is an initializer expression that computes the initial value of the variable }
GlobalEntry is an entry in globals
type GlobalVar ¶
type GlobalVar struct { Type Value // Type of the value stored by the variable Mutable bool // Whether the value of the variable can be changed by the set_global operator }
GlobalVar represents a global var.
type Import ¶
type Import struct { Module string Field string Type Importable }
Import is an imported object
type ImportGlobalVar ¶
type ImportGlobalVar struct {
Type GlobalVar
}
ImportGlobalVar is an imported global var.
type Importable ¶
type Importable interface{}
Importable is an interface of object that we want to import.
type LocalEntry ¶
type LocalEntry struct { Count uint32 // The total number of local variables of the given Type used in the function body Type Value // The type of value stored by the variable }
LocalEntry is an entry in locals.
type ResizableLimits ¶
type ResizableLimits struct { Flags uint32 // 1 if the Maximum field is valid Initial uint32 // initial length (in units of table elements or wasm pages) Maximum uint32 // If flags is 1, it describes the maximum size of the table or memory }
ResizableLimits is a limit boundaries of other objects
type Table ¶
type Table struct { ElementType byte Limits ResizableLimits }
Table represents a table.
Click to show internal directories.
Click to hide internal directories.