cranelift_wasm

Crate 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.

To get started, create a Parser using Parser::new and then follow the examples documented for Parser::parse or Parser::parse_all.

Modules§

  • Type definitions for maps and sets used by the wasmparser crate.
  • Definitions of name-related helpers and newtypes, primarily for the component model.
  • Types relating to type information provided by validation.

Macros§

  • A helper macro to conveniently iterate over all opcodes recognized by this crate. This can be used to work with either the Operator enumeration or the VisitOperator trait if your use case uniformly handles all operators the same way.

Structs§

Enums§

Traits§

  • A trait implemented for items that can be decoded directly from a BinaryReader, or that which can be parsed from the WebAssembly binary format.
  • A trait implemented for subsections of another outer section.
  • Trait implemented by types that can visit all Operator variants.
  • Types that qualify as Wasm validation database.

Functions§

Type Aliases§