[][src]Module vm::file_format_common

Constants for the binary format.

Definition for the constants of the binary format, used by the serializer and the deserializer. This module also offers helpers for the serialization and deserialization of certain integer indexes.

We use LEB128 for integer compression. LEB128 is a representation from the DWARF3 spec, http://dwarfstd.org/Dwarf3Std.php or https://en.wikipedia.org/wiki/LEB128. It's used to compress mostly indexes into the main binary tables.

Enums

BinaryConstants

Constant values for the binary format header.

Opcodes

List of opcodes constants.

SerializedKind
SerializedNativeStructFlag
SerializedNominalResourceFlag
SerializedType

Constants for signature blob values.

TableType

Constants for table types in the binary.

Constants

ACQUIRES_COUNT_MAX
ADDRESS_INDEX_MAX
BINARY_SIZE_LIMIT

Upper limit on the binary size

BYTECODE_COUNT_MAX
BYTECODE_INDEX_MAX
CONSTANT_INDEX_MAX
CONSTANT_SIZE_MAX
FIELD_COUNT_MAX
FIELD_HANDLE_INDEX_MAX
FIELD_INST_INDEX_MAX
FIELD_OFFSET_MAX
FUNCTION_HANDLE_INDEX_MAX
FUNCTION_INST_INDEX_MAX
IDENTIFIER_INDEX_MAX
IDENTIFIER_SIZE_MAX
LOCAL_INDEX_MAX
MODULE_HANDLE_INDEX_MAX
SIGNATURE_INDEX_MAX
SIGNATURE_SIZE_MAX
SIGNATURE_TOKEN_DEPTH_MAX
STRUCT_DEF_INDEX_MAX
STRUCT_DEF_INST_INDEX_MAX
STRUCT_HANDLE_INDEX_MAX
TABLE_CONTENT_SIZE_MAX
TABLE_COUNT_MAX
TABLE_INDEX_MAX
TABLE_OFFSET_MAX
TABLE_SIZE_MAX
TYPE_PARAMETER_COUNT_MAX
TYPE_PARAMETER_INDEX_MAX

Functions

instruction_key

The encoding of the instruction is the serialized form of it, but disregarding the serialization of the instruction's argument(s).

read_u8
read_u32
read_uleb128_as_u64