[−][src]Struct wasmtime_jit::CompiledModule
A compiled wasm module, ready to be instantiated.
Implementations
impl CompiledModule[src]
pub fn new<'data>(
compiler: &Compiler,
data: &'data [u8],
profiler: &dyn ProfilingAgent
) -> Result<Self, SetupError>[src]
compiler: &Compiler,
data: &'data [u8],
profiler: &dyn ProfilingAgent
) -> Result<Self, SetupError>
Compile a data buffer into a CompiledModule, which may then be instantiated.
pub unsafe fn instantiate(
&self,
resolver: &mut dyn Resolver,
signature_registry: &mut SignatureRegistry,
mem_creator: Option<&dyn RuntimeMemoryCreator>,
interrupts: Arc<VMInterrupts>,
host_state: Box<dyn Any>,
externref_activations_table: *mut VMExternRefActivationsTable,
stack_map_registry: *mut StackMapRegistry
) -> Result<InstanceHandle, InstantiationError>[src]
&self,
resolver: &mut dyn Resolver,
signature_registry: &mut SignatureRegistry,
mem_creator: Option<&dyn RuntimeMemoryCreator>,
interrupts: Arc<VMInterrupts>,
host_state: Box<dyn Any>,
externref_activations_table: *mut VMExternRefActivationsTable,
stack_map_registry: *mut StackMapRegistry
) -> Result<InstanceHandle, InstantiationError>
Crate an Instance from this CompiledModule.
Note that if only one instance of this module is needed, it may be more
efficient to call the top-level instantiate, since that avoids copying
the data initializers.
Unsafety
See InstanceHandle::new
pub fn data_initializers(&self) -> Vec<DataInitializer>[src]
Returns data initializers to pass to InstanceHandle::initialize
pub fn module(&self) -> &Arc<Module>[src]
Return a reference-counting pointer to a module.
pub fn module_mut(&mut self) -> Option<&mut Module>[src]
Return a reference to a mutable module (if possible).
pub fn finished_functions(
&self
) -> &BoxedSlice<DefinedFuncIndex, *mut [VMFunctionBody]>[src]
&self
) -> &BoxedSlice<DefinedFuncIndex, *mut [VMFunctionBody]>
Returns the map of all finished JIT functions compiled for this module
pub fn traps(&self) -> &Traps[src]
Returns the map for all traps in this module.
pub fn stack_maps(&self) -> &StackMaps[src]
Returns the map for each of this module's stack maps.
pub fn address_transform(&self) -> &ModuleAddressMap[src]
Returns a map of compiled addresses back to original bytecode offsets.
pub fn jit_code_ranges<'a>(
&'a self
) -> impl Iterator<Item = (usize, usize)> + 'a[src]
&'a self
) -> impl Iterator<Item = (usize, usize)> + 'a
Returns all ranges convered by JIT code.
pub fn code(&self) -> &Arc<ModuleCode>[src]
Returns module's JIT code.
Auto Trait Implementations
impl RefUnwindSafe for CompiledModule
impl Send for CompiledModule
impl Sync for CompiledModule
impl Unpin for CompiledModule
impl UnwindSafe for CompiledModule
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,