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

Function test_import_shared_memory

tests/all/threads.rs:58–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56#[test]
57#[cfg_attr(miri, ignore)]
58fn test_import_shared_memory() -> Result<()> {
59 let wat = r#"(module (import "env" "memory" (memory 1 5 shared)))"#;
60 let Some(engine) = engine() else {
61 return Ok(());
62 };
63 let module = Module::new(&engine, wat)?;
64 let mut store = Store::new(&engine, ());
65 let shared_memory = SharedMemory::new(&engine, MemoryType::shared(1, 5))?;
66 let _instance = Instance::new(&mut store, &module, &[shared_memory.into()])?;
67 Ok(())
68}
69
70#[test]
71#[cfg_attr(miri, ignore)]

Callers

nothing calls this directly

Calls 3

OkFunction · 0.85
engineFunction · 0.70
newFunction · 0.50

Tested by

no test coverage detected