Crate cranelift_wasm::wasmparser
source · Expand description
A simple event-driven library for parsing WebAssembly binary files (or streams).
The parser library reports events as they happen 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.
Modules
Types relating to type information provided by validation.
Structs
A reader for the alias section of a WebAssembly component.
A binary reader of the WebAssembly structures and types.
A binary reader for WebAssembly modules.
A br_table entries representation.
A reader for the code section of a WebAssembly module.
Represents an argument to instantiating a WebAssembly component.
Represents an export in a WebAssembly component.
A reader for the export section of a WebAssembly component.
Represents a type of a function in a WebAssembly component.
A reader for the function section of a WebAssembly component.
Represents an import in a WebAssembly component
A reader for the import section of a WebAssembly component.
Represents the start function in a WebAssembly component.
A reader for the start section of a WebAssembly component.
A reader for the type section of a WebAssembly component.
A reader for custom sections of a WebAssembly module.
Represents a data segment in a core WebAssembly module.
A reader for the data section of a WebAssembly module.
Represents a core WebAssembly element segment.
Represents the items of an element segment.
An iterator over element items in an element segment.
A reader for element items in an element segment.
A reader for the element section of a WebAssembly module.
Represents an export in a WebAssembly module.
A reader for the export section of a WebAssembly module.
Represents a type of a function in a WebAssembly module.
Validation context for a WebAssembly function.
Represents a WebAssembly function body.
A reader for the function section of a WebAssembly module.
Represents a core WebAssembly global.
A reader for the global section of a WebAssembly module.
Represents a global’s type.
An IEEE binary32 immediate floating point value, represented as a u32
containing the bit pattern.
An IEEE binary64 immediate floating point value, represented as a u64
containing the bit pattern.
Represents an import in a WebAssembly module.
A reader for the import section of a WebAssembly module.
Represents an indirect name map.
Represents an indirect name in the names custom section.
Represents a reader for indirect names from the names custom section.
Represents an initialization expression.
A reader for the instance section of a WebAssembly component.
A reader for the linking custom section of a WebAssembly module.
An iterator over locals in a function body.
A reader for a function body’s locals.
Represents a memory immediate in a WebAssembly memory instruction.
A reader for the memory section of a WebAssembly module.
Represents a memory’s type.
Represents an argument to instantiating a WebAssembly component.
Represents a name map from the names custom section.
A reader for the name custom section of a WebAssembly module.
Represents a name for an index from the names section.
A reader for direct names in the names custom section.
An iterator over a function’s operators.
An iterator over a function’s operators with offsets.
A reader for a core WebAssembly function’s operators.
An incremental parser of a binary WebAssembly module or component.
A field from the producers custom section.
Represents a field value in the producers custom section.
An iterator over fields in the producers custom section.
A reader for fields in the producers custom section.
A reader for the producers custom section of a WebAssembly module.
Represents a relocation entry.
A reader for the relocations custom section of a WebAssembly module.
An iterator over items in a section.
An iterator over a limited section iterator.
Represents a single name in the names custom section.
A reader for the table section of a WebAssembly module.
Represents a table’s type.
A reader for the tags section of a WebAssembly module.
A tag’s type.
A reader for the type section of a WebAssembly module.
Represents a 128-bit vector value.
Validator for a WebAssembly binary module or component.
The implementation of
WasmModuleResources
used by
Validator
.Represents a case in a variant interface type.
Flags for features that are enabled for validation.
Iterator over the inputs of a Wasm function type.
Iterator over the outputs of a Wasm function type.
Enums
Represents an alias in a WebAssembly component.
Represents a kind of alias.
Represents a block type.
Represents options for component functions.
A successful return payload from
Parser::parse
.Represents the kind of argument when instantiating a WebAssembly component.
Represents a function in a WebAssembly component.
Represents a component type definition in a WebAssembly component.
Represents a type defined in a WebAssembly component.
Represents known custom section kinds.
The kind of data segment.
Represents an individual item of an element segment.
The kind of element segment.
The supported encoding formats for the parser.
External types as defined here.
Represents an instance in a WebAssembly component.
Represents an instance type definition in a WebAssembly component.
Represents an interface type.
Represents a reference to an interface type.
Represents a linking type.
Represents the kind of argument when instantiating a WebAssembly module.
Represents a module type definition in a WebAssembly component.
Represents a name read from the names custom section.
Represents the type of name.
Values that can be parsed from a WebAssembly module or component.
Represents a primitive interface type.
Represents a relocation type.
Section code as defined here.
Represents a tag kind.
Represents the types of values in a WebAssembly module.
Represents a type defined in a WebAssembly module.
Represents a reference to a type definition.
Possible return values from
Validator::payload
.Traits
A trait implemented by section readers.
Implemented by sections with a limited number of items.
Types that qualify as Wasm function types for validation purposes.
Types that qualify as Wasm validation database.
Functions
Test whether the given buffer contains a valid WebAssembly module or component,
analogous to
WebAssembly.validate
in the JS API.Type Definitions
Represents the kind of export in a WebAssembly component.
The result for
BinaryReader
operations.Represents a SIMD lane index.