Expand description
The walrus
WebAssembly transformations library.
Re-exports§
pub use crate::ir::Local;
pub use crate::ir::LocalId;
pub use crate::ir::InstrLocId;
Modules§
- dot
- Utilities for emitting GraphViz dot files.
- ir
- Intermediate representation for instructions.
- passes
- Passes over whole modules or individual functions.
Structs§
- Code
Transform - Code transformation records, which is used to transform DWARF debug entries.
- Data
- A data segment.
- Element
- A passive segment which contains a list of functions
- Export
- A named item exported from the wasm.
- Function
- A wasm function.
- Function
Builder - Build instances of
LocalFunction
. - Global
- A wasm global.
- IdsTo
Indices - Maps our high-level identifiers to the raw indices they end up emitted at.
- Import
- A named item imported into the wasm.
- Imported
Function - An externally defined, imported function.
- Indices
ToIds - Maps from old indices in the original Wasm binary to
walrus
IDs. - Instr
SeqBuilder - A builder returned by instruction sequence-construction methods to build up instructions within a block/loop/if-else over time.
- Local
Function - A function defined locally within the wasm module.
- Memory
- A memory in the wasm.
- Module
- A wasm module.
- Module
Config - Configuration for a
Module
which currently affects parsing. - Module
Custom Sections - A collection of custom sections inside a Wasm module.
- Module
Data - All passive data sections of a wasm module, used to initialize memories via various instructions.
- Module
Debug Data - The DWARF debug section in input WebAssembly binary.
- Module
Elements - All element segments of a wasm module, used to initialize
anyfunc
tables, used as function pointers. - Module
Exports - The set of exports in a module.
- Module
Functions - The set of functions within a module.
- Module
Globals - The set of globals in each function in this module.
- Module
Imports - The set of imports in a module.
- Module
Locals - The set of locals in each function in this module.
- Module
Memories - The set of memories in this module.
- Module
Producers - Representation of the wasm custom section
producers
- Module
Tables - The set of tables in this module.
- Module
Types - The set of de-duplicated types within a module.
- RawCustom
Section - A raw, unparsed custom section.
- Table
- A table in the wasm.
- Type
- A function type.
- Typed
Custom Section Id - The id of a
CustomSection
instance with a statically-known type in aModuleCustomSections
. - Untyped
Custom Section Id - The id of some
CustomSection
instance in aModuleCustomSections
.
Enums§
- Const
Expr - A constant which is produced in WebAssembly, typically used in global initializers or element/data offsets.
- Data
Kind - The kind of data segment: passive or active.
- Element
Items - Represents the items of an element segment.
- Element
Kind - The kind of element segment.
- Error
Kind - A leaf wasm error type.
- Export
Item - An exported item.
- Function
Kind - The local- or external-specific bits of a function.
- Global
Kind - The different kinds of globals a wasm module can have
- Import
Kind - An imported item.
- RefType
- A reference type.
- ValType
- A value type.
Traits§
- Custom
Section - A trait for implementing custom sections.
- Custom
Section Id - A common trait for custom section identifiers.
Type Aliases§
- DataId
- A passive element segment identifier
- Element
Id - A passive element segment identifier
- Export
Id - The id of an export.
- Func
Params - Parameter(s) to a function
- Func
Results - Result(s) of a given function
- Function
Id - A function identifier.
- Global
Id - The id of a global.
- Import
Id - The id of an import.
- Memory
Id - The id of a memory.
- Result
- Either
Ok(T)
orErr(failure::Error)
.Result<T, Error>
- TableId
- The id of a table.
- TypeId
- An identifier for types.