pub struct CraneliftCompiler { /* private fields */ }
Expand description
A compiler that compiles a WebAssembly module with Cranelift, translating the Wasm to Cranelift IR, optimizing it and then translating to assembly.
Implementations
Trait Implementations
sourceimpl Compiler for CraneliftCompiler
impl Compiler for CraneliftCompiler
sourcefn get_middlewares(&self) -> &[Arc<dyn ModuleMiddleware>]
fn get_middlewares(&self) -> &[Arc<dyn ModuleMiddleware>]
Get the middlewares for this compiler
sourcefn compile_module(
&self,
target: &Target,
compile_info: &CompileModuleInfo,
module_translation_state: &ModuleTranslationState,
function_body_inputs: PrimaryMap<LocalFunctionIndex, FunctionBodyData<'_>>
) -> Result<Compilation, CompileError>
fn compile_module(
&self,
target: &Target,
compile_info: &CompileModuleInfo,
module_translation_state: &ModuleTranslationState,
function_body_inputs: PrimaryMap<LocalFunctionIndex, FunctionBodyData<'_>>
) -> Result<Compilation, CompileError>
Compile the module using Cranelift, producing a compilation result with associated relocations.
sourcefn validate_module(
&self,
features: &Features,
data: &'data [u8]
) -> Result<(), CompileError>
fn validate_module(
&self,
features: &Features,
data: &'data [u8]
) -> Result<(), CompileError>
Validates a module. Read more
sourcefn experimental_native_compile_module(
&self,
_target: &Target,
_module: &'module CompileModuleInfo,
_module_translation: &ModuleTranslationState,
_function_body_inputs: &PrimaryMap<LocalFunctionIndex, FunctionBodyData<'data>>,
_symbol_registry: &dyn SymbolRegistry,
_wasmer_metadata: &[u8]
) -> Option<Result<Vec<u8, Global>, CompileError>>
fn experimental_native_compile_module(
&self,
_target: &Target,
_module: &'module CompileModuleInfo,
_module_translation: &ModuleTranslationState,
_function_body_inputs: &PrimaryMap<LocalFunctionIndex, FunctionBodyData<'data>>,
_symbol_registry: &dyn SymbolRegistry,
_wasmer_metadata: &[u8]
) -> Option<Result<Vec<u8, Global>, CompileError>>
Compiles a module into a native object file. Read more
sourceimpl MemoryUsage for CraneliftCompiler
impl MemoryUsage for CraneliftCompiler
sourcefn size_of_val(&self, visited: &mut dyn MemoryUsageTracker) -> usize
fn size_of_val(&self, visited: &mut dyn MemoryUsageTracker) -> usize
Returns the size of the referenced value in bytes. Read more
Auto Trait Implementations
impl !RefUnwindSafe for CraneliftCompiler
impl Send for CraneliftCompiler
impl Sync for CraneliftCompiler
impl Unpin for CraneliftCompiler
impl !UnwindSafe for CraneliftCompiler
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more