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

Method instantiate_async

crates/wasi-http/src/handler.rs:305–315  ·  view source on GitHub ↗

Instantiates the pre-instance.

(&self, store: impl AsContextMut<Data = T>)

Source from the content-addressed store, hash-verified

303impl<T: 'static> ProxyPre<T> {
304 /// Instantiates the pre-instance.
305 pub async fn instantiate_async(&self, store: impl AsContextMut<Data = T>) -> Result<Proxy>
306 where
307 T: Send,
308 {
309 Ok(match self {
310 #[cfg(feature = "p2")]
311 Self::P2(pre) => Proxy::P2(pre.instantiate_async(store).await?),
312 #[cfg(feature = "p3")]
313 Self::P3(pre) => Proxy::P3(pre.instantiate_async(store).await?),
314 })
315 }
316}
317
318/// Represents either a `wasi:http/incoming-handler@0.2.x` or

Callers 15

bench_callsFunction · 0.45
host_to_wasmFunction · 0.45
instantiate_intoMethod · 0.45
load_main_moduleMethod · 0.45
invoke_componentMethod · 0.45
run_command_componentMethod · 0.45
invoke_debuggerMethod · 0.45
instantiateMethod · 0.45
async_then_sync_trapFunction · 0.45
sync_then_async_trapFunction · 0.45
call_linked_func_asyncFunction · 0.45
basic_async_hookFunction · 0.45

Calls 1

OkFunction · 0.85

Tested by 15

test_many_parametersFunction · 0.36
test_many_resultsFunction · 0.36
test_sync_host_funcFunction · 0.36
test_async_host_funcFunction · 0.36
runFunction · 0.36
test_round_trip_directFunction · 0.36
async_closed_streamsFunction · 0.36
async_closed_streamFunction · 0.36
test_round_trip_manyFunction · 0.36