diff --git a/lib/api/src/js/imports.rs b/lib/api/src/js/imports.rs index 91db636c4e3..a668b96d5fd 100644 --- a/lib/api/src/js/imports.rs +++ b/lib/api/src/js/imports.rs @@ -195,6 +195,7 @@ impl Imports { module: &Module, object: js_sys::Object, ) -> Result { + use crate::js::externals::VMExtern; let module_imports: HashMap<(String, String), ExternType> = module .imports() .map(|import| { @@ -217,7 +218,7 @@ impl Imports { let import_js: wasm_bindgen::JsValue = import_entry.get(1); let key = (module_name.clone(), import_name); let extern_type = module_imports.get(&key).unwrap(); - let export = Export::from_js_value(import_js, store, extern_type.clone())?; + let export = VMExtern::from_js_value(import_js, store, extern_type.clone())?; let extern_ = Extern::from_vm_extern(store, export); map.insert(key, extern_); } diff --git a/lib/api/src/js/instance.rs b/lib/api/src/js/instance.rs index 23b07130da6..5e1ddbf2e45 100644 --- a/lib/api/src/js/instance.rs +++ b/lib/api/src/js/instance.rs @@ -109,7 +109,7 @@ impl Instance { instance: WebAssembly::Instance, ) -> Result { use crate::js::externals::VMExtern; - let instance_exports = instance.get(store.as_store_ref().objects()).exports(); + let instance_exports = instance.exports(); let exports = module .exports() .map(|export_type| {