[][src]Struct substrate_wasmtime_jit::CompiledModule

pub struct CompiledModule { /* fields omitted */ }

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]

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]

Construct a CompiledModule from component parts.

pub unsafe fn instantiate(
    &self,
    resolver: &mut dyn Resolver
) -> Result<InstanceHandle, InstantiationError>
[src]

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]

Returns the map of all finished JIT functions compiled for this module

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.