Documentation
¶
Overview ¶
The binary package handles reading and writing of wasm binary files https://webassembly.github.io/spec/core/binary/index.html
Index ¶
- Constants
- Variables
- func Read(reader io.Reader) (*api.Document, error)
- func ReadByte(reader io.Reader) (byte, error)
- func ReadBytes(reader io.Reader, size int) ([]byte, error)
- func ReadComponent(reader io.Reader) (*api.Component, error)
- func ReadExport(reader io.Reader) (api.Export, error)
- func ReadExports(size uint32, reader io.Reader) ([]api.Export, error)
- func ReadExpression(reader io.Reader) (*api.Expression, error)
- func ReadFunc(reader io.Reader) (*api.Func, error)
- func ReadFuncTypes(size uint32, reader io.Reader) ([]*api.FuncType, error)
- func ReadFuncs(size uint32, reader io.Reader) ([]*api.Func, error)
- func ReadInstruction(reader io.Reader) (api.Instruction, error)
- func ReadLebU128(reader io.Reader) (uint32, error)
- func ReadModule(reader io.Reader) (*api.Module, error)
- func ReadOpCode(reader io.Reader) (opcode.Opcode, error)
- func ReadPreamble(reader io.Reader) (api.Preamble, error)
- func ReadResultType(reader io.Reader) (api.ResultType, error)
- func ReadString(reader io.Reader) (string, error)
- func ReadType(reader io.Reader) (*api.FuncType, error)
- func ReadUInt16(reader io.Reader) (uint16, error)
- func ReadUInt32(reader io.Reader) (uint32, error)
- func ReadValueType(reader io.Reader) (api.ValType, error)
- func ReadValueTypeVector(reader io.Reader) ([]api.ValType, error)
- func UpdateFuncsWithCode(module *api.Module, size uint32, reader io.Reader) error
- type ExportKind
- type Section
- type SectionID
- type ValType
Constants ¶
View Source
const ComponentVersion uint16 = 0x0a
View Source
const ModuleVersion uint16 = 0x01
Variables ¶
View Source
var Magic = []byte{0x00, 0x61, 0x73, 0x6d}
Functions ¶
func ReadExpression ¶
func ReadExpression(reader io.Reader) (*api.Expression, error)
func ReadInstruction ¶
func ReadInstruction(reader io.Reader) (api.Instruction, error)
func ReadResultType ¶
func ReadResultType(reader io.Reader) (api.ResultType, error)
Types ¶
type ExportKind ¶
type ExportKind byte
const FuncExportKind ExportKind = 0x00
const GlobalExportKind ExportKind = 0x03
const MemoryExportKind ExportKind = 0x02
const TableExportKind ExportKind = 0x01
Click to show internal directories.
Click to hide internal directories.