Trait wasmer_runtime_near::Compiler [−][src]
pub trait Compiler { 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
fn compile(
&self,
wasm: &[u8],
comp_conf: CompilerConfig,
Token
) -> Result<ModuleInner, CompileError>
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.
unsafe fn from_cache(
&self,
cache: Artifact,
Token
) -> Result<ModuleInner, Error>
Implementors
impl<MCG, FCG, RM, E, CGEN> Compiler for StreamingCompiler<MCG, FCG, RM, E, CGEN> where
E: Debug,
MCG: ModuleCodeGenerator<FCG, RM, E>,
FCG: FunctionCodeGenerator<E>,
RM: 'static + RunnableModule,
CGEN: Fn() -> MiddlewareChain,