constant

package
v0.63.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package constant contains WASM constant definitions.

Index

Constants

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

WASM module section IDs.

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

ValueType represents an intrinsic value type in WASM.

View Source
const (
	ImportDescType byte = iota
	ImportDescTable
	ImportDescMem
	ImportDescGlobal
)

WASM import descriptor types.

View Source
const (
	ExportDescType byte = iota
	ExportDescTable
	ExportDescMem
	ExportDescGlobal
)

WASM export descriptor types.

View Source
const (
	Const byte = iota
	Mutable
)

WASM global varialbe mutability flag.

View Source
const (
	NameSectionModuleType byte = iota
	NameSectionFunctionsType
	NameSectionLocalsType
)

Subtypes of the 'name' custom section

View Source
const BlockTypeEmpty byte = 0x40

BlockTypeEmpty represents a block type.

View Source
const ElementTypeAnyFunc byte = 0x70

ElementTypeAnyFunc indicates the type of a table import.

View Source
const FunctionTypeID = byte(0x60)

FunctionTypeID indicates the start of a function type definition.

View Source
const Magic = uint32(0x6D736100)

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

View Source
const NameSectionCustomID = "name"

NameSectionCustomID is the ID of the "Name" section Custom Section

View Source
const Version = uint32(1)

Version defines the WASM version.

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL