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§
Sourcefn 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>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".