Struct wasmtime_jit::Compiler [−][src]
pub struct Compiler { /* fields omitted */ }Expand description
A WebAssembly code JIT compiler.
A Compiler instance owns the executable memory that it allocates.
TODO: Evolve this to support streaming rather than requiring a &[u8]
containing a whole wasm module at once.
TODO: Consider using cranelift-module.
Implementations
pub fn new(
isa: Box<dyn TargetIsa>,
strategy: CompilationStrategy,
tunables: Tunables,
features: WasmFeatures
) -> Self
pub fn new(
isa: Box<dyn TargetIsa>,
strategy: CompilationStrategy,
tunables: Tunables,
features: WasmFeatures
) -> Self
Construct a new Compiler.
Return the compiler’s strategy.
Return the target’s frontend configuration settings.
Return the enabled wasm features.
pub fn compile<'data>(
&self,
translation: &mut ModuleTranslation<'_>,
types: &TypeTables
) -> Result<Compilation, SetupError>
pub fn compile<'data>(
&self,
translation: &mut ModuleTranslation<'_>,
types: &TypeTables
) -> Result<Compilation, SetupError>
Compile the given function bodies.