Compiler

Trait Compiler 

Source
pub trait Compiler {
    // Required methods
    fn compile(
        &self,
        wasm: &[u8],
        comp_conf: CompilerConfig,
        _: Token,
    ) -> Result<ModuleInner, CompileError>;
    unsafe fn from_cache(
        &self,
        cache: Artifact,
        _: Token,
    ) -> Result<ModuleInner, Error>;
}

Required Methods§

Source

fn compile( &self, wasm: &[u8], comp_conf: CompilerConfig, _: Token, ) -> Result<ModuleInner, CompileError>

Compiles a Module from WebAssembly binary format. The CompileToken parameter ensures that this can only be called from inside the runtime.

Source

unsafe fn from_cache( &self, cache: Artifact, _: Token, ) -> Result<ModuleInner, Error>

Implementors§

Source§

impl<MCG, FCG, RM, E, CGEN> Compiler for StreamingCompiler<MCG, FCG, RM, E, CGEN>
where MCG: ModuleCodeGenerator<FCG, RM, E>, FCG: FunctionCodeGenerator<E>, RM: RunnableModule + 'static, E: Debug, CGEN: Fn() -> MiddlewareChain,