Documentation

Overview

    Package wa contains miscellaneous WebAssembly-related things.

    Index

    Constants

    View Source
    const (
    	PageBits = 16
    	PageSize = 1 << PageBits
    )
    View Source
    const (
    	Int   = ScalarCategory(0)
    	Float = ScalarCategory(1)
    )
    View Source
    const (
    	Size32 = Size(4)
    	Size64 = Size(8)
    )
    View Source
    const (
    	Void = Type(0)
    	I32  = Type(4 | Int)
    	I64  = Type(8 | Int)
    	F32  = Type(4 | Float)
    	F64  = Type(8 | Float)
    )

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type FuncType

    type FuncType struct {
    	Params []Type
    	Result Type
    }

    func (FuncType) Equal

    func (f FuncType) Equal(other FuncType) bool

    func (FuncType) String

    func (f FuncType) String() (s string)

    type GlobalType

    type GlobalType byte

    func MakeGlobalType

    func MakeGlobalType(t Type, mutable bool) (g GlobalType)

    func (GlobalType) Encode

    func (g GlobalType) Encode() (buf [2]byte)

      Encode as WebAssembly. Result is undefined if GlobalType representation is not valid.

      func (GlobalType) Mutable

      func (g GlobalType) Mutable() bool

      func (GlobalType) Type

      func (g GlobalType) Type() Type

      type ScalarCategory

      type ScalarCategory uint8

      func (ScalarCategory) String

      func (cat ScalarCategory) String() string

      type Size

      type Size uint8

      type Type

      type Type uint8

      func (Type) Category

      func (t Type) Category() ScalarCategory

        Category of a non-void type.

        func (Type) Encode

        func (t Type) Encode() byte

          Encode as WebAssembly. Result is undefined if Type representation is not valid.

          func (Type) Size

          func (t Type) Size() Size

            Size in bytes.

            func (Type) String

            func (t Type) String() string

            Directories

            Path Synopsis
            Package opcode enumerates WebAssembly instructions.
            Package opcode enumerates WebAssembly instructions.