[][src]Crate wasmparser

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

BinaryReader

A binary reader of the WebAssembly structures and types.

BinaryReaderError
BrTable

A br_table entries representation.

CodeSectionReader
Data
DataSectionReader
Element
ElementItems
ElementItemsReader
ElementSectionReader
Export
ExportSectionReader
FuncType
FunctionBody
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
LinkingSectionReader
LocalName
LocalsReader
MemoryImmediate
MemorySectionReader
MemoryType
ModuleReader

Reads top-level WebAssembly file structure: header and sections.

NameSectionReader
Naming
NamingReader
OperatorValidatorConfig
OperatorsReader
Parser

The Parser type. A simple event-driven parser of WebAssembly binary format. The read(&mut self) is used to iterate through WebAssembly records.

ProducersField
ProducersFieldValue
ProducersFieldValuesReader
ProducersSectionReader
Range

Bytecode range in the WebAssembly module.

Reloc
RelocEntry
RelocSectionReader
ResizableLimits
Section
SectionIterator
SectionIteratorLimited
TableSectionReader
TableType
TypeSectionReader
V128
ValidatingOperatorParser
ValidatingParser
ValidatingParserConfig

Enums

CustomSectionContent
CustomSectionKind
DataKind
ElemSectionEntryTable
ElementItem
ElementKind
ExternalKind

External types as defined here.

ImportSectionEntryType
LinkingType
Name
NameEntry
NameType
Operator

Instructions as defined here.

ParserInput
ParserState
RelocType
SectionCode

Section code as defined here.

SectionContent
Type

Types as defined here.

TypeOrFuncType

Either a value type or a function type.

Traits

SectionReader
SectionWithLimitedItems
WasmDecoder
WasmFuncType

Types that qualify as Wasm function types for validation purposes.

WasmGlobalType

Types that qualify as Wasm global types for validation purposes.

WasmMemoryType

Types that qualify as Wasm memory types for validation purposes.

WasmModuleResources

Types that qualify as Wasm valiation database.

WasmTableType

Types that qualify as Wasm table types for validation purposes.

WasmType

Types that qualify as Wasm types for validation purposes.

Functions

validate

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

validate_function_body

Test whether the given buffer contains a valid WebAssembly function. The resources parameter contains all needed data to validate the operators.

Type Definitions

Result