wasmtime_environ::component

Trait ComponentCompiler

source
pub trait ComponentCompiler: Send + Sync {
    // Required method
    fn compile_trampoline(
        &self,
        component: &ComponentTranslation,
        types: &ComponentTypesBuilder,
        trampoline: TrampolineIndex,
        tunables: &Tunables,
    ) -> Result<AllCallFunc<Box<dyn Any + Send>>>;
}
Expand description

Compilation support necessary for components.

Required Methods§

source

fn compile_trampoline( &self, component: &ComponentTranslation, types: &ComponentTypesBuilder, trampoline: TrampolineIndex, tunables: &Tunables, ) -> Result<AllCallFunc<Box<dyn Any + Send>>>

Compiles the pieces necessary to create a VMFuncRef for the trampoline specified.

Each trampoline is a member of the Trampoline enumeration and has a unique purpose and is translated differently. See the implementation of this trait for Cranelift for more information.

Implementors§