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

Function cross_engine_module_exports

tests/all/module.rs:307–327  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

305#[test]
306#[cfg_attr(miri, ignore)]
307fn cross_engine_module_exports() -> Result<()> {
308 let a_engine = Engine::default();
309 let b_engine = Engine::default();
310
311 let a_module = Module::new(&a_engine, "(module)")?;
312 let b_module = Module::new(
313 &b_engine,
314 r#"
315 (module
316 (func (export "x"))
317 )
318 "#,
319 )?;
320
321 let export = b_module.get_export_index("x").unwrap();
322
323 let mut store = Store::new(&a_engine, ());
324 let instance = Instance::new(&mut store, &a_module, &[])?;
325 assert!(instance.get_module_export(&mut store, &export).is_none());
326 Ok(())
327}
328
329/// Smoke test for registering and unregistering modules (and their rec group
330/// entries) concurrently.

Callers

nothing calls this directly

Calls 4

OkFunction · 0.85
newFunction · 0.50
unwrapMethod · 0.45
get_export_indexMethod · 0.45

Tested by

no test coverage detected