wasmtime_environ/component/
compiler.rs1use crate::component::{ComponentTranslation, ComponentTypesBuilder, UnsafeIntrinsic};
2use crate::{Abi, CompiledFunctionBody, FuncKey, Tunables};
3use anyhow::Result;
4
5pub trait ComponentCompiler: Send + Sync {
7 fn compile_trampoline(
14 &self,
15 component: &ComponentTranslation,
16 types: &ComponentTypesBuilder,
17 key: FuncKey,
18 abi: Abi,
19 tunables: &Tunables,
20 symbol: &str,
21 ) -> Result<CompiledFunctionBody>;
22
23 fn compile_intrinsic(
25 &self,
26 tunables: &Tunables,
27 component: &ComponentTranslation,
28 intrinsic: UnsafeIntrinsic,
29 abi: Abi,
30 symbol: &str,
31 ) -> Result<CompiledFunctionBody>;
32}