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

Function usable_exported_modules

tests/all/component_model/aot.rs:105–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103#[test]
104#[cfg_attr(miri, ignore)]
105fn usable_exported_modules() -> Result<()> {
106 let engine = super::engine();
107 let component = Component::new(
108 &engine,
109 r#"(component
110 (core module $m)
111 (core module $m1 (export "a")
112 (import "" "" (func (param i32)))
113 )
114 )"#,
115 )?;
116 let mut store = Store::new(&engine, ());
117 let instance = Linker::new(&engine).instantiate(&mut store, &component)?;
118 let module = instance.get_module(&mut store, "a").unwrap();
119 let mut core_linker = wasmtime::Linker::new(&engine);
120 core_linker.func_wrap("", "", |_: u32| {})?;
121 core_linker.instantiate(&mut store, &module)?;
122 Ok(())
123}
124
125#[test]
126#[cfg_attr(miri, ignore)]

Callers

nothing calls this directly

Calls 7

OkFunction · 0.85
engineFunction · 0.50
newFunction · 0.50
instantiateMethod · 0.45
unwrapMethod · 0.45
get_moduleMethod · 0.45
func_wrapMethod · 0.45

Tested by

no test coverage detected