Expand description
A crate to parse the textual format for WebAssembly interface types.
This crate is a work-in-progress and should expect to have a good deal of change as the official proposal evolves. The main purpose of this crate is to parse a textual file into a binary representation, and the parsing includes parsing of all of the WebAssembly core types/syntax as well.
Structs§
- Export
- An exported wasm interface types function
- Func
- A definition of an adapter function
- Implement
- A means of implementing a core wasm imported function with an adapter function.
- Import
- An imported function declaration using wasm interface types.
- Instructions
- A list of instructions, possibly in s-expression form
- Memory
ToString - Payload of the
memory-to-string
instruction - Module
- A WebAssembly interface types-enhanced module.
- String
ToMemory - Payload of the
string-to-memory
instruction - Type
- A type declaration in a wasm interface type subsection
- TypeUse
- An inline type definition or a use of a type defined elsewhere.
- Wat
- A
*.wat
file in its entirety, including wasm interface types.
Enums§
- Adapter
- List of possible
@interface
adapters that can be listed in a module. - Func
Kind - Different flavors of functions that can be defined.
- Implementation
- Different ways to specify an implementation
- Implemented
- Different ways to specify what’s being implemented
- Instruction
- List of instructions in adapter functions.
- ValType
- Possible value types that can be used in function signatures and such.
Functions§
- parse_
bytes - Parses in-memory bytes as either the text format or a binary WebAssembly module.
- parse_
file - Parses a
file
on the filesystem as a textual representation of WebAssembly Interface Types, returning the binary representation of the module. - parse_
str - Parses an in-memory string as the text format, returning the file as a binary WebAssembly file.