opa: github.com/open-policy-agent/opa/internal/wasm/constant Index | Files

package constant

import "github.com/open-policy-agent/opa/internal/wasm/constant"

Package constant contains WASM constant definitions.

Index

Package Files

constant.go

Constants

const (
    CustomSectionID uint8 = iota
    TypeSectionID
    ImportSectionID
    FunctionSectionID
    TableSectionID
    MemorySectionID
    GlobalSectionID
    ExportSectionID
    StartSectionID
    ElementSectionID
    CodeSectionID
    DataSectionID
)

WASM module section IDs.

const (
    ValueTypeF64 byte = iota + 0x7C
    ValueTypeF32
    ValueTypeI64
    ValueTypeI32
)

ValueType represents an intrinsic value type in WASM.

const (
    ImportDescType byte = iota
    ImportDescTable
    ImportDescMem
    ImportDescGlobal
)

WASM import descriptor types.

const (
    ExportDescType byte = iota
    ExportDescTable
    ExportDescMem
    ExportDescGlobal
)

WASM export descriptor types.

const (
    Const byte = iota
    Mutable
)

WASM global varialbe mutability flag.

const BlockTypeEmpty byte = 0x40

BlockTypeEmpty represents a block type.

const ElementTypeAnyFunc byte = 0x70

ElementTypeAnyFunc indicates the type of a table import.

const FunctionTypeID = byte(0x60)

FunctionTypeID indicates the start of a function type definition.

const Magic = uint32(0x6D736100)

Magic bytes at the beginning of every WASM file ("\0asm").

const Version = uint32(1)

Version defines the WASM version.

Package constant is imported by 1 packages. Updated 2018-10-09. Refresh now. Tools for package owners.