Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidTypeByte = errors.New("invalid byte")
ErrInvalidTypeByte means the type byte mismatches the one from wasm binary
Functions ¶
func HasSameSignature ¶
HasSameSignature will verify whether the two types.ValueType are same
Types ¶
type FuncType ¶
FuncType classify the signature of functions, mapping a vector of parameters to a vector of results, written as follows.
type GlobalType ¶
GlobalType classify global variables, which hold a value and can either be mutable or immutable.
func ReadGlobalType ¶
func ReadGlobalType(r io.Reader) (*GlobalType, error)
ReadGlobalType will read a types.GlobalType from the io.Reader
type Limits ¶
Limits classify the size range of resizeable storage associated with memory types and table types https://www.w3.org/TR/wasm-core-1/#limits%E2%91%A0
type MemoryType ¶
type MemoryType = Limits
MemoryType classify linear memories and their size range. https://www.w3.org/TR/wasm-core-1/#memory-types%E2%91%A0
func ReadMemoryType ¶
func ReadMemoryType(r *bytes.Reader) (*MemoryType, error)
ReadMemoryType will read a types.MemoryType from the io.Reader
type TableType ¶
TableType classify tables over elements of element types within a size range. https://www.w3.org/TR/wasm-core-1/#table-types%E2%91%A0
type ValueType ¶
type ValueType byte
ValueType classifies the individual values that WebAssembly code can compute with and the values that a variable accepts https://www.w3.org/TR/wasm-core-1/#value-types%E2%91%A0
const ( // ValueTypeI32 classify 32 bit integers ValueTypeI32 ValueType = 0x7f // ValueTypeI64 classify 64 bit integers // Integers are not inherently signed or unsigned, the interpretation is determined by individual operations ValueTypeI64 ValueType = 0x7e // ValueTypeF32 classify 32 bit floating-point data, known as single ValueTypeF32 ValueType = 0x7d // ValueTypeF64 classify 64 bit floating-point data, known as double ValueTypeF64 ValueType = 0x7c )
func ReadValueTypes ¶
ReadValueTypes will read a types.ValueType from the io.Reader