Trait golem_wasm_ast::AstCustomization

source ·
pub trait AstCustomization: Debug + Clone + PartialEq {
    type Expr: Debug + Clone + PartialEq;
    type Data: Debug + Clone + PartialEq + Section<CoreIndexSpace, CoreSectionType>;
    type Custom: Debug + Clone + PartialEq + Section<CoreIndexSpace, CoreSectionType> + Section<ComponentIndexSpace, ComponentSectionType>;
}
Expand description

A trait for customizing some of the data types used in the WASM AST.

Three types are customizable:

  • Expr: The type of the expression nodes in the AST, holding sequence of WASM instructions.
  • Data: The type of the data section in the AST.
  • Custom: The type of the custom section in the AST.

Use one of the predefined customization types or create your own:

  • DefaultAst uses the real AST nodes, keeping all parsed information
  • IgnoreAll ignores all instructions, custom sections and data sections
  • IgnoreAllButMetadata ignores all instructions, data sections and custom sections except those that hold information parsable by the wasm-metadata crate.

Required Associated Types§

Object Safety§

This trait is not object safe.

Implementors§