wag: github.com/tsavola/wag/wa Index | Files | Directories

package wa

import "github.com/tsavola/wag/wa"

Package wa contains miscellaneous WebAssembly-related things.

Index

Package Files

functype.go globaltype.go page.go type.go

Constants

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

type FuncType Uses

type FuncType struct {
    Params []Type
    Result Type
}

func (FuncType) Equal Uses

func (f FuncType) Equal(other FuncType) bool

func (FuncType) String Uses

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

type GlobalType Uses

type GlobalType byte

func MakeGlobalType Uses

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

func (GlobalType) Encode Uses

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

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

func (GlobalType) Mutable Uses

func (g GlobalType) Mutable() bool

func (GlobalType) Type Uses

func (g GlobalType) Type() Type

type ScalarCategory Uses

type ScalarCategory uint8

func (ScalarCategory) String Uses

func (cat ScalarCategory) String() string

type Size Uses

type Size uint8

type Type Uses

type Type uint8

func (Type) Category Uses

func (t Type) Category() ScalarCategory

Category of a non-void type.

func (Type) Encode Uses

func (t Type) Encode() byte

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

func (Type) Size Uses

func (t Type) Size() Size

Size in bytes.

func (Type) String Uses

func (t Type) String() string

Directories

PathSynopsis
opcodePackage opcode enumerates WebAssembly instructions.

Package wa is imported by 36 packages. Updated 2019-11-02. Refresh now. Tools for package owners.