fn invoke_start_function(&mut self, module: &Module) -> Result<(), InstantiationError> {
        if let Some(start_index) = module.start_func {
            let (callee_address, callee_vmctx) = match module.defined_func_index(start_index) {
                Some(defined_start_index) => {
                    let body = *self
                        .finished_functions
                        .get(defined_start_index)
                        .expect("start function index is out of bounds");
                    (body, self.vmctx_mut() as *mut VMContext)
                }
                None => {
                    assert!(start_index.index() < module.imported_funcs.len());
                    let import = self.imported_function(start_index);
                    (import.body, import.vmctx)
                }
            };

            // Make the call.
            unsafe { wasmtime_call(callee_address, callee_vmctx) }
                .map_err(InstantiationError::StartTrap)?;
        }

        Ok(())
    }
/// Invoke the WebAssembly start function of the instance, if one is present.
Invoke the WebAssembly start function of the instance, if one is present.
Invoke the WebAssembly start function of the instance if one is present .
fn invoke_start_function(&mut self, module: &Module) -> Result<(), InstantiationError> {
        if let Some(start_index) = module.start_func {
            let (callee_address, callee_vmctx) = match module.defined_func_index(start_index) {
                Some(defined_start_index) => {
                    let body = *self
                        .finished_functions
                        .get(defined_start_index)
                        .expect("start function index is out of bounds");
                    (body, self.vmctx_mut() as *mut VMContext)
                }
                None => {
                    assert!(start_index.index() < module.imported_funcs.len());
                    let import = self.imported_function(start_index);
                    (import.body, import.vmctx)
                }
            };
            // Make the call.
            unsafe { wasmtime_call(callee_address, callee_vmctx) }
                .map_err(InstantiationError::StartTrap)?;
        }
        Ok(())
    }
fn invoke_start_function ( & mut self , module : & Module ) -> Result < ( ) , InstantiationError > { if let Some ( start_index ) = module . start_func { let ( callee_address , callee_vmctx ) = match module . defined_func_index ( start_index ) { Some ( defined_start_index ) => { let body = * self . finished_functions . get ( defined_start_index ) . expect ( " " ) ; ( body , self . vmctx_mut ( ) as * mut VMContext ) } None => { assert ! ( start_index index ( ) module imported_funcs len ( ) ) ; let import = self . imported_function ( start_index ) ; ( import . body , import . vmctx ) } } ; // Make the call. unsafe { wasmtime_call ( callee_address , callee_vmctx ) } . map_err ( InstantiationError :: StartTrap ) ? ; } Ok ( ( ) ) }
Invoke the WebAssembly start function of the instance, if one is present.
Invoke the WebAssembly start function of the instance if one is present .
&mut self
module
&Module