Documentation ¶
Overview ¶
Package modulereader implements binary wasm reader statemachine that simple reads binary code into internal representation
Index ¶
- type Reader
- func (r *Reader) Read(p []byte) (int, error)
- func (r *Reader) ReadByte() (byte, error)
- func (r *Reader) ReadBytes(n int) ([]byte, error)
- func (r *Reader) ReadDataSegment() (types.DataSegment, error)
- func (r *Reader) ReadElementSegment() (types.ElementSegment, error)
- func (r *Reader) ReadExportEntry() (types.ExportEntry, error)
- func (r *Reader) ReadFunction() (types.FunctionSig, error)
- func (r *Reader) ReadFunctionBody() (types.FunctionBody, error)
- func (r *Reader) ReadGlobalEntry() (types.GlobalEntry, error)
- func (r *Reader) ReadGlobalVar() (*types.GlobalVar, error)
- func (r *Reader) ReadImportEntry() (types.Import, error)
- func (r *Reader) ReadInitExpr() ([]byte, error)
- func (r Reader) ReadLocalEntry() (types.LocalEntry, error)
- func (r *Reader) ReadMemory() (*types.Memory, error)
- func (r *Reader) ReadResizableLimits() (*types.ResizableLimits, error)
- func (r *Reader) ReadString(n int) (string, error)
- func (r *Reader) ReadTable() (*types.Table, error)
- func (r *Reader) ReadU32() (uint32, error)
- func (r *Reader) ReadValueType() (types.Value, error)
- func (r *Reader) ReadVarUint32() (uint32, error)
- func (r *Reader) ReadVarUint32Size() (res uint32, size uint, err error)
- func (r *Reader) ReadVarint32() (int32, error)
- func (r *Reader) ReadVarint32Size() (res int32, size uint, err error)
- func (r *Reader) ReadVarint64Size() (res int64, size uint, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
Reader is generalised module reader context and tokenizer
func (*Reader) ReadDataSegment ¶
func (r *Reader) ReadDataSegment() (types.DataSegment, error)
ReadDataSegment reads one segment
func (*Reader) ReadElementSegment ¶
func (r *Reader) ReadElementSegment() (types.ElementSegment, error)
ReadElementSegment reads one element
func (*Reader) ReadExportEntry ¶
func (r *Reader) ReadExportEntry() (types.ExportEntry, error)
ReadExportEntry reads one export entry
func (*Reader) ReadFunction ¶
func (r *Reader) ReadFunction() (types.FunctionSig, error)
ReadFunction reads function signature
func (*Reader) ReadFunctionBody ¶
func (r *Reader) ReadFunctionBody() (types.FunctionBody, error)
ReadFunctionBody reads whole function
func (*Reader) ReadGlobalEntry ¶
func (r *Reader) ReadGlobalEntry() (types.GlobalEntry, error)
ReadGlobalEntry reads one entry of globals
func (*Reader) ReadGlobalVar ¶
ReadGlobalVar reads global var
func (*Reader) ReadImportEntry ¶
ReadImportEntry reads one generic import entry
func (*Reader) ReadInitExpr ¶
ReadInitExpr reads init code
func (Reader) ReadLocalEntry ¶
func (r Reader) ReadLocalEntry() (types.LocalEntry, error)
ReadLocalEntry reads one locals entry
func (*Reader) ReadMemory ¶
ReadMemory reads memory stub
func (*Reader) ReadResizableLimits ¶
func (r *Reader) ReadResizableLimits() (*types.ResizableLimits, error)
ReadResizableLimits reads ResizableLimits object
func (*Reader) ReadString ¶
ReadString reads n bytes as string
func (*Reader) ReadValueType ¶
ReadValueType reads valuetype
func (*Reader) ReadVarUint32 ¶
ReadVarUint32 reads uint32
func (*Reader) ReadVarUint32Size ¶
ReadVarUint32Size reads leb128 uint
func (*Reader) ReadVarint32 ¶
ReadVarint32 reads int32
func (*Reader) ReadVarint32Size ¶
ReadVarint32Size reads int