Path: blob/main/crates/environ/src/component/compiler.rs
1692 views
use crate::component::{AllCallFunc, ComponentTranslation, ComponentTypesBuilder};1use crate::{CompiledFunctionBody, FuncKey, Tunables};2use anyhow::Result;34/// Compilation support necessary for components.5pub trait ComponentCompiler: Send + Sync {6/// Compiles the pieces necessary to create a `VMFuncRef` for the7/// `trampoline` specified.8///9/// Each trampoline is a member of the `Trampoline` enumeration and has a10/// unique purpose and is translated differently. See the implementation of11/// this trait for Cranelift for more information.12fn compile_trampoline(13&self,14component: &ComponentTranslation,15types: &ComponentTypesBuilder,16key: FuncKey,17tunables: &Tunables,18symbol: &str,19) -> Result<AllCallFunc<CompiledFunctionBody>>;20}212223