[][src]Crate wit_parser

A parser for the WebAssembly Interface Types binary section.

This crates is intended to provide the low-level parsing support for WebAssembly Interface Types. The official specification has no mention of the binary encoding, so this is currently an invented format. This will only work when paired with similar tools using the same format, so this is unstable and you'll need to be careful about using this. This is not an official project nor is it a standard, treat it appropriately!

Structs

Error

Errors that can happen during parsing.

Export

An element of the Exports subsection which lists all exports from wasm interface types, used to export interface adapters from a module.

Exports

An iterator over instances of Export in the export subsection of a wasm interface types section.

Func

A element of the Funcs subsection which represents the body of an interface adapter, working with wasm interface types rather than core wasm types.

Funcs

An iterator over instances of Func in the function subsection of a wasm interface types section.

Implement

An element of the Implements subsection which is a mapping that connects a core wasm func to being implemented by an adapter function.

Implements

An iterator over instances of Implement in the implement subsection of a wasm interface types section.

Import

An element of the Imports subsection which lists where the import comes from as well as the type signature of the function.

Imports

An iterator over instances of Import in the import subsection of a wasm interface types section.

Instructions

A parser for each Instruction contained within a Func

Parser

Top-level parser for the WebAssembly Interface Types binary section.

StringToMemory

Payload of the string-to-memory instruction

Type

A type signatured reference by imports/functions, very similar to a wasm type declaration.

Types

An iterator over instances of Type in the type subsection of a wasm interface types section.

Enums

Instruction

Operators that can be found in the body of a function in a wasm interface types section.

Section

List of various sections that can be found in the WebAssembly Interface Types section.

ValType

List of value types supported in wasm interface types

Type Definitions

Result

A convenience typedef with Error as the default error.