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

Function require_async_with_linker_func_wrap

tests/all/missing_async.rs:119–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

117
118#[tokio::test]
119async fn require_async_with_linker_func_wrap() -> Result<()> {
120 let engine = Engine::default();
121 let mut store = Store::new(&engine, ());
122 let mut linker = Linker::new(store.engine());
123 linker.func_wrap_async("", "", |_, ()| Box::new(async {}))?;
124 let module = Module::new(store.engine(), r#"(module (import "" "" (func)))"#)?;
125 assert!(linker.instantiate(&mut store, &module).is_err());
126 linker.instantiate_async(&mut store, &module).await?;
127 Ok(())
128}
129
130#[test]
131fn require_async_with_debug_handler() -> Result<()> {

Callers

nothing calls this directly

Calls 5

OkFunction · 0.85
newFunction · 0.50
engineMethod · 0.45
func_wrap_asyncMethod · 0.45
instantiate_asyncMethod · 0.45

Tested by

no test coverage detected