/// 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`
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.
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 .
pub unsafe fn instantiate(
        &self,
        imports: Imports<'_>,
        lookup_shared_signature: &dyn Fn(SignatureIndex) -> VMSharedSignatureIndex,
        mem_creator: Option<&dyn RuntimeMemoryCreator>,
        interrupts: *const VMInterrupts,
        host_state: Box<dyn Any>,
        externref_activations_table: *mut VMExternRefActivationsTable,
        stack_map_registry: *mut StackMapRegistry,
    ) -> Result<InstanceHandle, InstantiationError> {
        InstanceHandle::new(
            self.module.clone(),
            self.code.clone(),
            &self.finished_functions.0,
            imports,
            mem_creator,
            lookup_shared_signature,
            host_state,
            interrupts,
            externref_activations_table,
            stack_map_registry,
        )
    }
pub unsafe fn instantiate ( & self , imports : Imports < ' _ > , lookup_shared_signature : & dyn Fn ( SignatureIndex ) -> VMSharedSignatureIndex , mem_creator : Option < & dyn RuntimeMemoryCreator > , interrupts : * const VMInterrupts , host_state : Box < dyn Any > , externref_activations_table : * mut VMExternRefActivationsTable , stack_map_registry : * mut StackMapRegistry , ) -> Result < InstanceHandle , InstantiationError > { InstanceHandle :: new ( self . module . clone ( ) , self . code . clone ( ) , & self . finished_functions . 0 , imports , mem_creator , lookup_shared_signature , host_state , interrupts , externref_activations_table , stack_map_registry , ) }
Crate an `Instance` from this `CompiledModule`.
Crate an ` Instance ` from this ` CompiledModule ` .
&self
imports
Imports<'_>
lookup_shared_signature
&dyn Fn(SignatureIndex) -> VMSharedSignatureIndex
mem_creator
Option<&dyn RuntimeMemoryCreator>
interrupts
*const VMInterrupts
host_state
Box<dyn Any>
externref_activations_table
*mut VMExternRefActivationsTable
stack_map_registry
*mut StackMapRegistry
unsafety
None