Crate wasmparser[][src]

A simple event-driven library for parsing WebAssembly binary files (or streams).

The parser library reports events as they happend and only stores parsing information for a brief period of time, making it very fast and memory-efficient. The event-driven model, however, has some drawbacks. If you need random access to the entire WebAssembly data-structure, this is not the right library for you. You could however, build such a data-structure using this library.

Structs

AliasSectionReader
BinaryReader

A binary reader of the WebAssembly structures and types.

BinaryReaderError
BrTable

A br_table entries representation.

CodeSectionReader
Data
DataSectionReader
Element
ElementItems
ElementItemsIterator
ElementItemsReader
ElementSectionReader
EventSectionReader
EventType
Export
ExportSectionReader
ExportType
FuncType
FuncValidator

Validation context for a WebAssembly function.

FunctionBody
FunctionLocalName
FunctionLocalReader
FunctionName
FunctionSectionReader
Global
GlobalSectionReader
GlobalType
Ieee32

An IEEE binary32 immediate floating point value, represented as a u32 containing the bitpattern.

Ieee64

An IEEE binary64 immediate floating point value, represented as a u64 containing the bitpattern.

Import
ImportSectionReader
InitExpr
Instance
InstanceArg
InstanceArgsReader
InstanceSectionReader
InstanceType
LinkingSectionReader
LocalName
LocalsIterator
LocalsReader
MemoryImmediate
MemorySectionReader
ModuleName
ModuleSectionReader
ModuleType
NameSectionReader
Naming
NamingReader
NestedModule
OperatorsIterator
OperatorsIteratorWithOffsets
OperatorsReader
Parser

An incremental parser of a binary WebAssembly module.

ProducersField
ProducersFieldValue
ProducersFieldValuesIterator
ProducersFieldValuesReader
ProducersSectionReader
Range

Bytecode range in the WebAssembly module.

Reloc
RelocSectionReader
ResizableLimits
ResizableLimits64
SectionIterator
SectionIteratorLimited
TableSectionReader
TableType
TypeSectionReader
V128
Validator

Validator for a WebAssembly binary module.

ValidatorResources

The implementation of WasmModuleResources used by Validator.

WasmFeatures

Flags for features that are enabled for validation.

WasmFuncTypeInputs

Iterator over the inputs of a Wasm function type.

WasmFuncTypeOutputs

Iterator over the outputs of a Wasm function type.

Enums

Alias
Chunk

A successful return payload from Parser::parse.

CustomSectionKind
DataKind
ElementItem
ElementKind
ExternalKind

External types as defined here.

ImportSectionEntryType
LinkingType
MemoryType
Name
NameType
Operator

Instructions as defined here.

Payload

Values that can be parsed from a wasm module.

RelocType
SectionCode

Section code as defined here.

Type

Types as defined here.

TypeDef
TypeOrFuncType

Either a value type or a function type.

ValidPayload

Possible return values from Validator::payload.

Traits

SectionReader
SectionWithLimitedItems
WasmFuncType

Types that qualify as Wasm function types for validation purposes.

WasmModuleResources

Types that qualify as Wasm valiation database.

Functions

validate

Test whether the given buffer contains a valid WebAssembly module, analogous to WebAssembly.validate in the JS API.

Type Definitions

Result
SIMDLaneIndex