Documentation
¶
Overview ¶
Package wasm contains all the Plain Old Go Objects (POGO) that make up the module tree. These objects only use basic go types or refer to other module tree objects. The few methods defined here are operating strictly within their own type.
The purpose of keeping these types simple and clean is to be able to use them as communication objects between modules thereby preventing many occasions for Go's dreaded circular module reference error
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Custom ¶
type Custom struct {
Identifier
Data []byte
SectionId byte
}
type Data ¶
type Data struct {
Identifier
Bytes []byte
MemoryIndex uint32
Offset []helper.Instruction
}
type Element ¶
type Element struct {
Identifier
FuncIndexes []uint32
Offset []helper.Instruction
TableIndex uint32
}
func NewElement ¶
func NewElement() *Element
type Export ¶
type Export struct {
Identifier
Index uint32
ExternalType desc.ExternalType
}
type FuncType ¶
type FuncType struct {
Identifier
ParamTypes []value.DataType
ResultTypes []value.DataType
}
func NewFuncType ¶
func NewFuncType() *FuncType
func (*FuncType) CheckTypes ¶
type Function ¶
type Function struct {
Identifier
Body []helper.Instruction
FrameSize uint32
FuncType *FuncType
HostCall HostInterface
Locals []*Local
Module *Module
}
func NewFunction ¶
func NewFunction() *Function
func (*Function) MaxLocalIndex ¶
type Global ¶
type Global struct {
Identifier
Init []helper.Instruction
Mutable bool
DataType value.DataType
}
type HostContext ¶ added in v0.0.10
type HostInterface ¶
type HostInterface func(ctx *HostContext) error
type Identifier ¶
type Local ¶
type Local struct {
Identifier
DataType value.DataType
}
type Module ¶
type Module struct {
Identifier
Analyzed bool
Customs []*Custom
Datas []*Data
Debug bool
Elements []*Element
Exports []*Export
ExternalFunctions uint32
ExternalGlobals uint32
ExternalMemories uint32
ExternalTables uint32
Functions []*Function
FuncTypes []*FuncType
Globals []*Global
GlobalVars []*Variable
IsLinked bool
Memories []*Memory
Start uint32
Tables []*Table
}
func (*Module) MaxFuncTypes ¶
func (*Module) MaxFunctions ¶
func (*Module) MaxGlobals ¶
func (*Module) MaxMemories ¶
type Table ¶
Click to show internal directories.
Click to hide internal directories.