[−][src]Struct substrate_wasmtime_jit::CompiledModule
A compiled wasm module, ready to be instantiated.
Methods
impl CompiledModule
[src]
pub fn new<'data>(
compiler: &Compiler,
data: &'data [u8],
debug_info: bool,
profiler: Option<&Arc<Mutex<Box<dyn ProfilingAgent + Send>>>>
) -> Result<Self, SetupError>
[src]
compiler: &Compiler,
data: &'data [u8],
debug_info: bool,
profiler: Option<&Arc<Mutex<Box<dyn ProfilingAgent + Send>>>>
) -> Result<Self, SetupError>
Compile a data buffer into a CompiledModule
, which may then be instantiated.
pub fn from_parts(
module: Module,
finished_functions: BoxedSlice<DefinedFuncIndex, *const [VMFunctionBody]>,
data_initializers: Box<[OwnedDataInitializer]>,
signatures: BoxedSlice<SignatureIndex, VMSharedSignatureIndex>,
dbg_jit_registration: Option<GdbJitImageRegistration>,
trap_registration: TrapRegistration
) -> Self
[src]
module: Module,
finished_functions: BoxedSlice<DefinedFuncIndex, *const [VMFunctionBody]>,
data_initializers: Box<[OwnedDataInitializer]>,
signatures: BoxedSlice<SignatureIndex, VMSharedSignatureIndex>,
dbg_jit_registration: Option<GdbJitImageRegistration>,
trap_registration: TrapRegistration
) -> Self
Construct a CompiledModule
from component parts.
pub unsafe fn instantiate(
&self,
resolver: &mut dyn Resolver
) -> Result<InstanceHandle, InstantiationError>
[src]
&self,
resolver: &mut dyn Resolver
) -> 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 module(&self) -> &Arc<Module>
[src]
Return a reference-counting pointer to a module.
pub fn module_ref(&self) -> &Module
[src]
Return a reference to a module.
pub fn finished_functions(
&self
) -> &BoxedSlice<DefinedFuncIndex, *const [VMFunctionBody]>
[src]
&self
) -> &BoxedSlice<DefinedFuncIndex, *const [VMFunctionBody]>
Returns the map of all finished JIT functions compiled for this module
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>,