Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodeSegment ¶
CodeSegment is one unit in the wasman.Module's CodeSection
func ReadCodeSegment ¶
func ReadCodeSegment(r *bytes.Reader) (*CodeSegment, error)
ReadCodeSegment reads one CodeSegment from the io.Reader
type DataSegment ¶
type DataSegment struct { MemoryIndex uint32 // supposed to be zero OffsetExpression *expr.Expression Init []byte }
DataSegment is one unit of the wasman.Module's DataSection, initializing a range of memory, at a given offset, with a static vector of bytes
https://www.w3.org/TR/wasm-core-1/#data-segments%E2%91%A0
func ReadDataSegment ¶
func ReadDataSegment(r *bytes.Reader) (*DataSegment, error)
ReadDataSegment reads one DataSegment from the io.Reader
type ElemSegment ¶
type ElemSegment struct { TableIndex uint32 OffsetExpr *expr.Expression Init []uint32 }
ElemSegment is one unit of the wasm.Module's ElementsSection, initializing a subrange of a table, at a given offset, from a static vector of elements.
https://www.w3.org/TR/wasm-core-1/#element-segments%E2%91%A0
func ReadElemSegment ¶
func ReadElemSegment(r *bytes.Reader) (*ElemSegment, error)
ReadElemSegment reads one ElemSegment from the io.Reader
type ExportDesc ¶
ExportDesc means export descriptions, which describe an export in one wasman.Module
func ReadExportDesc ¶
func ReadExportDesc(r *bytes.Reader) (*ExportDesc, error)
ReadExportDesc reads one ExportDesc from the io.Reader
type ExportSegment ¶
type ExportSegment struct { Name string Desc *ExportDesc }
ExportSegment is one unit of the wasm.Module's ExportSection
func ReadExportSegment ¶
func ReadExportSegment(r *bytes.Reader) (*ExportSegment, error)
ReadExportSegment reads one ExportSegment from the io.Reader
type GlobalSegment ¶
type GlobalSegment struct { Type *types.GlobalType Init *expr.Expression }
GlobalSegment is one unit of the wasm.Module's GlobalSection
func ReadGlobalSegment ¶
func ReadGlobalSegment(r *bytes.Reader) (*GlobalSegment, error)
ReadGlobalSegment reads one GlobalSegment from the io.Reader
type ImportDesc ¶
type ImportDesc struct { Kind byte TypeIndexPtr *uint32 // => func x TableTypePtr *types.TableType // => table tt MemTypePtr *types.MemoryType // => mem mt GlobalTypePtr *types.GlobalType // => global gt }
ImportDesc means import descriptions, which describe an import in one wasman.Module
func ReadImportDesc ¶
func ReadImportDesc(r *bytes.Reader) (*ImportDesc, error)
ReadImportDesc reads one ImportDesc from the io.Reader
type ImportSegment ¶
type ImportSegment struct { Module string Name string Desc *ImportDesc }
ImportSegment is one unit of the wasm.Module's ImportSection
func ReadImportSegment ¶
func ReadImportSegment(r *bytes.Reader) (*ImportSegment, error)
ReadImportSegment reads one ImportSegment from the io.Reader
type Kind ¶
type Kind = byte
Kind means the types of the extern values https://www.w3.org/TR/wasm-core-1/#external-values%E2%91%A0 https://www.w3.org/TR/wasm-core-1/#external-typing%E2%91%A0