pub fn instantiate(
    compiler: &mut Compiler,
    data: &[u8],
    resolver: &mut dyn Resolver,
) -> Result<Instance, SetupError> {
    let raw = RawCompiledModule::new(compiler, data, resolver)?;

    Instance::new(
        Rc::new(raw.module),
        raw.finished_functions,
        raw.imports,
        &*raw.data_initializers,
        raw.signatures,
        Box::new(()),
    )
    .map_err(SetupError::Instantiate)
}
/// Create a new `Instance` by compiling the wasm module in `data` and instatiating it.
///
/// This is equivalent to createing a `CompiledModule` and calling `instantiate()` on it,
/// but avoids creating an intermediate copy of the data initializers.
Create a new `Instance` by compiling the wasm module in `data` and instatiating it.
This is equivalent to createing a `CompiledModule` and calling `instantiate()` on it,
but avoids creating an intermediate copy of the data initializers.
Create a new ` Instance ` by compiling the wasm module in ` data ` and instatiating it . This is equivalent to createing a ` CompiledModule ` and calling ` instantiate () ` on it but avoids creating an intermediate copy of the data initializers .
pub fn instantiate(
    compiler: &mut Compiler,
    data: &[u8],
    resolver: &mut dyn Resolver,
) -> Result<Instance, SetupError> {
    let raw = RawCompiledModule::new(compiler, data, resolver)?;
    Instance::new(
        Rc::new(raw.module),
        raw.finished_functions,
        raw.imports,
        &*raw.data_initializers,
        raw.signatures,
        Box::new(()),
    )
    .map_err(SetupError::Instantiate)
}
pub fn instantiate ( compiler : & mut Compiler , data : & [ u8 ] , resolver : & mut dyn Resolver , ) -> Result < Instance , SetupError > { let raw = RawCompiledModule :: new ( compiler , data , resolver ) ? ; Instance :: new ( Rc :: new ( raw . module ) , raw . finished_functions , raw . imports , & * raw . data_initializers , raw . signatures , Box :: new ( ( ) ) , ) . map_err ( SetupError :: Instantiate ) }
Create a new `Instance` by compiling the wasm module in `data` and instatiating it.
Create a new ` Instance ` by compiling the wasm module in ` data ` and instatiating it .
compiler
&mut Compiler
data
&[u8]
resolver
&mut dyn Resolver