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 ReadByte(reader io.Reader) (byte, error)
- func ReadInstruction(reader io.Reader) (instruction.Instruction, error)
- func ReadLebU128(reader io.Reader) (uint32, error)
- func ReadOpCode(reader io.Reader) (opcode.Opcode, error)
- func ReadUInt16(reader io.Reader) (uint16, error)
- func ReadUInt32(reader io.Reader) (uint32, error)
- type Code
- type CodeSection
- type Component
- type Document
- type FunctionSection
- type FunctionType
- type Local
- type Module
- type Preamble
- type Root
- type Section
- type SectionID
- type TypeSection
- type ValueType
Constants ¶
View Source
const ComponentVersion uint16 = 0x0d
View Source
const ModuleVersion uint16 = 0x01
Variables ¶
View Source
var Magic = []byte{0x00, 0x61, 0x73, 0x6d}
Functions ¶
func ReadInstruction ¶
func ReadInstruction(reader io.Reader) (instruction.Instruction, error)
Types ¶
type Code ¶
type Code struct { Size uint32 Locals []Local Expression []instruction.Instruction }
type CodeSection ¶
func ReadCodeSection ¶
func ReadCodeSection(size uint32, reader io.Reader) (*CodeSection, error)
type FunctionSection ¶
func ReadFunctionSection ¶
func ReadFunctionSection(size uint32, reader io.Reader) (*FunctionSection, error)
type FunctionType ¶
type TypeSection ¶
type TypeSection struct { ID SectionID Size uint32 Types []*FunctionType }
func ReadTypeSection ¶
func ReadTypeSection(size uint32, reader io.Reader) (*TypeSection, error)
Click to show internal directories.
Click to hide internal directories.