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

Method instantiate

tests/all/component_model.rs:49–61  ·  view source on GitHub ↗
(
        self,
        store: &mut Store<T>,
        linker: &Linker<T>,
        component: &Component,
    )

Source from the content-addressed store, hash-verified

47 }
48
49 async fn instantiate<T: Send>(
50 self,
51 store: &mut Store<T>,
52 linker: &Linker<T>,
53 component: &Component,
54 ) -> Result<Instance> {
55 match self {
56 ApiStyle::Sync => linker.instantiate(store, &component),
57 ApiStyle::Async | ApiStyle::AsyncNotConcurrent | ApiStyle::Concurrent => {
58 linker.instantiate_async(store, &component).await
59 }
60 }
61 }
62
63 async fn call<
64 P: ComponentNamedList + Lower + 'static,

Callers 15

async_then_sync_trapFunction · 0.45
sync_then_async_trapFunction · 0.45
typed_v128_importsFunction · 0.45
wrap_and_typed_i31refFunction · 0.45
call_linked_funcFunction · 0.45
recursionFunction · 0.45
trappingFunction · 0.45

Calls 1

instantiate_asyncMethod · 0.45