Sha256: 5f9fc6a6d775b71887504e2f8177831e6dcfe80579e46dca92ae9db55126b102

Contents?: true

Size: 841 Bytes

Versions: 4

Compression:

Stored size: 841 Bytes

Contents

use crate::component::{AllCallFunc, ComponentTranslation, ComponentTypesBuilder, TrampolineIndex};
use crate::prelude::*;
use crate::Tunables;
use anyhow::Result;
use std::any::Any;

/// Compilation support necessary for components.
pub trait ComponentCompiler: Send + Sync {
    /// 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.
    fn compile_trampoline(
        &self,
        component: &ComponentTranslation,
        types: &ComponentTypesBuilder,
        trampoline: TrampolineIndex,
        tunables: &Tunables,
    ) -> Result<AllCallFunc<Box<dyn Any + Send>>>;
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/wasmtime-environ-29.0.0/src/component/compiler.rs
wasmtime-28.0.0 ./ext/cargo-vendor/wasmtime-environ-28.0.0/src/component/compiler.rs
wasmtime-27.0.0 ./ext/cargo-vendor/wasmtime-environ-27.0.0/src/component/compiler.rs
wasmtime-26.0.0 ./ext/cargo-vendor/wasmtime-environ-26.0.0/src/component/compiler.rs