MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / new_async

Method new_async

crates/wasmtime/src/runtime/instance.rs:200–209  ·  view source on GitHub ↗
(
        mut store: impl AsContextMut,
        module: &Module,
        imports: &[Extern],
    )

Source from the content-addressed store, hash-verified

198 /// details on Wasmtime's out-of-memory handling.
199 #[cfg(feature = "async")]
200 pub async fn new_async(
201 mut store: impl AsContextMut,
202 module: &Module,
203 imports: &[Extern],
204 ) -> Result<Instance> {
205 let mut store = store.as_context_mut();
206 let imports = Instance::typecheck_externs(store.0, module, imports)?;
207 // See `new` for notes on this unsafety
208 unsafe { Instance::new_started(&mut store, module, imports.as_ref(), Asyncness::Yes).await }
209 }
210
211 fn typecheck_externs(
212 store: &mut StoreOpaque,

Callers

nothing calls this directly

Calls 2

as_context_mutMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected