pub struct LLVMCompiler { /* private fields */ }
Expand description
A compiler that compiles a WebAssembly module with LLVM, translating the Wasm to LLVM IR, optimizing it and then translating to assembly.
Implementations§
Source§impl LLVMCompiler
impl LLVMCompiler
Sourcepub fn new(config: LLVM) -> LLVMCompiler
pub fn new(config: LLVM) -> LLVMCompiler
Creates a new LLVM compiler
Trait Implementations§
Source§impl Compiler for LLVMCompiler
impl Compiler for LLVMCompiler
Source§fn compile_module<'data, 'module>(
&self,
target: &Target,
compile_info: &'module mut CompileModuleInfo,
module_translation: &ModuleTranslationState,
function_body_inputs: PrimaryMap<LocalFunctionIndex, FunctionBodyData<'data>>,
) -> Result<Compilation, CompileError>
fn compile_module<'data, 'module>( &self, target: &Target, compile_info: &'module mut CompileModuleInfo, module_translation: &ModuleTranslationState, function_body_inputs: PrimaryMap<LocalFunctionIndex, FunctionBodyData<'data>>, ) -> Result<Compilation, CompileError>
Compile the module using LLVM, producing a compilation result with associated relocations.
Source§fn experimental_native_compile_module<'data, 'module>(
&self,
target: &Target,
compile_info: &'module mut CompileModuleInfo,
module_translation: &ModuleTranslationState,
function_body_inputs: &PrimaryMap<LocalFunctionIndex, FunctionBodyData<'data>>,
symbol_registry: &dyn SymbolRegistry,
wasmer_metadata: &[u8],
) -> Option<Result<Vec<u8>, CompileError>>
fn experimental_native_compile_module<'data, 'module>( &self, target: &Target, compile_info: &'module mut CompileModuleInfo, module_translation: &ModuleTranslationState, function_body_inputs: &PrimaryMap<LocalFunctionIndex, FunctionBodyData<'data>>, symbol_registry: &dyn SymbolRegistry, wasmer_metadata: &[u8], ) -> Option<Result<Vec<u8>, CompileError>>
Compiles a module into a native object file. Read more
Source§fn validate_module<'data>(
&self,
features: &Features,
data: &'data [u8],
) -> Result<(), CompileError>
fn validate_module<'data>( &self, features: &Features, data: &'data [u8], ) -> Result<(), CompileError>
Validates a module. Read more
Auto Trait Implementations§
impl Freeze for LLVMCompiler
impl !RefUnwindSafe for LLVMCompiler
impl Send for LLVMCompiler
impl Sync for LLVMCompiler
impl Unpin for LLVMCompiler
impl !UnwindSafe for LLVMCompiler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more