Struct wasmtime_jit::Compiler
source · [−]pub struct Compiler { /* private fields */ }
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
sourceimpl Compiler
impl Compiler
sourcepub 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
.
sourceimpl Compiler
impl Compiler
sourcepub fn frontend_config(&self) -> TargetFrontendConfig
pub fn frontend_config(&self) -> TargetFrontendConfig
Return the target’s frontend configuration settings.
sourcepub fn features(&self) -> &WasmFeatures
pub fn features(&self) -> &WasmFeatures
Return the enabled wasm features.
sourcepub 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.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Compiler
impl Send for Compiler
impl Sync for Compiler
impl Unpin for Compiler
impl !UnwindSafe for Compiler
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more