wag: github.com/tsavola/wag/internal/module Index | Files

package module

import "github.com/tsavola/wag/internal/module"

Index

Package Files

error.go module.go

Constants

const (
    MagicNumber = uint32(0x6d736100)
    Version     = uint32(1)
)
const (
    MaxFunctions  = 32768
    MaxFuncParams = 255
    MaxTypes      = MaxFunctions
    MaxImports    = MaxFunctions
)
const (
    SectionCustom = SectionID(iota)
    SectionType
    SectionImport
    SectionFunction
    SectionTable
    SectionMemory
    SectionGlobal
    SectionExport
    SectionStart
    SectionElement
    SectionCode
    SectionData

    NumSections
)
const (
    ExternalKindFunction = ExternalKind(iota)
    ExternalKindTable
    ExternalKindMemory
    ExternalKindGlobal
)

func Error Uses

func Error(text string) error

func Errorf Uses

func Errorf(format string, args ...interface{}) error

func WrapError Uses

func WrapError(cause error, text string) error

type ExternalKind Uses

type ExternalKind byte

func (ExternalKind) String Uses

func (kind ExternalKind) String() (s string)

type Global Uses

type Global struct {
    Type    wa.Type
    Mutable bool
    Init    uint64
}
type Header struct {
    MagicNumber uint32
    Version     uint32
}

type Import Uses

type Import struct {
    Module string
    Field  string
}

type ImportFunc Uses

type ImportFunc struct {
    Import
    LibraryFunc uint32
}

type ImportIndex Uses

type ImportIndex struct {
    Import
    VectorIndex int
    Variadic    bool
}

type Library Uses

type Library struct {
    Types       []wa.FuncType
    Funcs       []uint32
    ImportFuncs []ImportIndex
    ExportFuncs map[string]uint32
    CodeFuncs   [][]byte
}

type M Uses

type M struct {
    Types         []wa.FuncType
    Funcs         []uint32
    ImportFuncs   []ImportFunc
    TableLimit    ResizableLimits
    MemoryLimit   ResizableLimits
    Globals       []Global
    ImportGlobals []Import
    ExportFuncs   map[string]uint32
    StartIndex    uint32
    StartDefined  bool
    TableFuncs    []uint32
}

type ResizableLimits Uses

type ResizableLimits struct {
    Init int
    Max  int // -1 if unlimited (memory).
}

type SectionID Uses

type SectionID byte

func (SectionID) String Uses

func (id SectionID) String() string

Package module imports 3 packages (graph) and is imported by 13 packages. Updated 2020-02-22. Refresh now. Tools for package owners.