pub trait ComponentCompiler: Send + Sync {
// Required methods
fn compile_trampoline(
&self,
component: &ComponentTranslation,
types: &ComponentTypesBuilder,
key: FuncKey,
abi: Abi,
tunables: &Tunables,
symbol: &str,
) -> Result<CompiledFunctionBody>;
fn compile_intrinsic(
&self,
tunables: &Tunables,
component: &ComponentTranslation,
intrinsic: UnsafeIntrinsic,
abi: Abi,
symbol: &str,
) -> Result<CompiledFunctionBody>;
}Expand description
Compilation support necessary for components.
Required Methods§
Sourcefn compile_trampoline(
&self,
component: &ComponentTranslation,
types: &ComponentTypesBuilder,
key: FuncKey,
abi: Abi,
tunables: &Tunables,
symbol: &str,
) -> Result<CompiledFunctionBody>
fn compile_trampoline( &self, component: &ComponentTranslation, types: &ComponentTypesBuilder, key: FuncKey, abi: Abi, tunables: &Tunables, symbol: &str, ) -> Result<CompiledFunctionBody>
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.
Sourcefn compile_intrinsic(
&self,
tunables: &Tunables,
component: &ComponentTranslation,
intrinsic: UnsafeIntrinsic,
abi: Abi,
symbol: &str,
) -> Result<CompiledFunctionBody>
fn compile_intrinsic( &self, tunables: &Tunables, component: &ComponentTranslation, intrinsic: UnsafeIntrinsic, abi: Abi, symbol: &str, ) -> Result<CompiledFunctionBody>
Compile the given Wasmtime intrinsic.