diff --git a/lib/api/src/externals/function.rs b/lib/api/src/externals/function.rs index 3a8adc510..cf5bc04d5 100644 --- a/lib/api/src/externals/function.rs +++ b/lib/api/src/externals/function.rs @@ -431,7 +431,7 @@ impl Function { Ok(results.into_boxed_slice()) } - pub(crate) fn from_export(store: &Store, wasmer_export: ExportFunction) -> Self { + pub(crate) fn from_vm_export(store: &Store, wasmer_export: ExportFunction) -> Self { if let Some(trampoline) = wasmer_export.call_trampoline { Self { store: store.clone(), diff --git a/lib/api/src/externals/global.rs b/lib/api/src/externals/global.rs index a306b9a94..6dcac0d35 100644 --- a/lib/api/src/externals/global.rs +++ b/lib/api/src/externals/global.rs @@ -180,7 +180,7 @@ impl Global { Ok(()) } - pub(crate) fn from_export(store: &Store, wasmer_export: ExportGlobal) -> Self { + pub(crate) fn from_vm_export(store: &Store, wasmer_export: ExportGlobal) -> Self { Self { store: store.clone(), global: wasmer_export.from, diff --git a/lib/api/src/externals/memory.rs b/lib/api/src/externals/memory.rs index 32583c82f..16dc7b202 100644 --- a/lib/api/src/externals/memory.rs +++ b/lib/api/src/externals/memory.rs @@ -220,7 +220,7 @@ impl Memory { unsafe { MemoryView::new(base as _, length as u32) } } - pub(crate) fn from_export(store: &Store, wasmer_export: ExportMemory) -> Self { + pub(crate) fn from_vm_export(store: &Store, wasmer_export: ExportMemory) -> Self { Self { store: store.clone(), memory: wasmer_export.from, diff --git a/lib/api/src/externals/mod.rs b/lib/api/src/externals/mod.rs index 370a3173d..ba073d6ca 100644 --- a/lib/api/src/externals/mod.rs +++ b/lib/api/src/externals/mod.rs @@ -43,13 +43,13 @@ impl Extern { } } - /// Create an `Extern` from an `Export`. - pub fn from_export(store: &Store, export: Export) -> Self { + /// Create an `Extern` from an `wasmer_vm::Export`. + pub fn from_vm_export(store: &Store, export: Export) -> Self { match export { - Export::Function(f) => Self::Function(Function::from_export(store, f)), - Export::Memory(m) => Self::Memory(Memory::from_export(store, m)), - Export::Global(g) => Self::Global(Global::from_export(store, g)), - Export::Table(t) => Self::Table(Table::from_export(store, t)), + Export::Function(f) => Self::Function(Function::from_vm_export(store, f)), + Export::Memory(m) => Self::Memory(Memory::from_vm_export(store, m)), + Export::Global(g) => Self::Global(Global::from_vm_export(store, g)), + Export::Table(t) => Self::Table(Table::from_vm_export(store, t)), } } } diff --git a/lib/api/src/externals/table.rs b/lib/api/src/externals/table.rs index 4bcbf2575..92e145cae 100644 --- a/lib/api/src/externals/table.rs +++ b/lib/api/src/externals/table.rs @@ -139,7 +139,7 @@ impl Table { Ok(()) } - pub(crate) fn from_export(store: &Store, wasmer_export: ExportTable) -> Self { + pub(crate) fn from_vm_export(store: &Store, wasmer_export: ExportTable) -> Self { Self { store: store.clone(), table: wasmer_export.from, diff --git a/lib/api/src/instance.rs b/lib/api/src/instance.rs index 50b67739d..21986eea8 100644 --- a/lib/api/src/instance.rs +++ b/lib/api/src/instance.rs @@ -80,7 +80,7 @@ impl Instance { .map(|export| { let name = export.name().to_string(); let export = handle.lookup(&name).expect("export"); - let extern_ = Extern::from_export(store, export); + let extern_ = Extern::from_vm_export(store, export); (name, extern_) }) .collect::(); diff --git a/lib/api/src/types.rs b/lib/api/src/types.rs index 80924c33c..638d79d3b 100644 --- a/lib/api/src/types.rs +++ b/lib/api/src/types.rs @@ -82,7 +82,7 @@ impl ValFuncRef for Val { vmctx: item.vmctx, call_trampoline: None, }; - let f = Function::from_export(store, export); + let f = Function::from_vm_export(store, export); Self::FuncRef(f) } } diff --git a/lib/c-api/src/wasm_c_api/wasi/mod.rs b/lib/c-api/src/wasm_c_api/wasi/mod.rs index 68516c66a..13823b456 100644 --- a/lib/c-api/src/wasm_c_api/wasi/mod.rs +++ b/lib/c-api/src/wasm_c_api/wasi/mod.rs @@ -335,7 +335,7 @@ unsafe fn wasi_get_imports_inner( import_type.name() ), })); - let inner = Extern::from_export(store, export); + let inner = Extern::from_vm_export(store, export); Some(Box::new(wasm_extern_t { instance: None, diff --git a/lib/deprecated/runtime-core/src/module.rs b/lib/deprecated/runtime-core/src/module.rs index 7ef483dcb..b43166dd3 100644 --- a/lib/deprecated/runtime-core/src/module.rs +++ b/lib/deprecated/runtime-core/src/module.rs @@ -159,12 +159,12 @@ impl Module { ( (namespace, name), - new::wasmer::Extern::from_export(store, Export::Function(function)), + new::wasmer::Extern::from_vm_export(store, Export::Function(function)), ) } export => ( (namespace, name), - new::wasmer::Extern::from_export(store, export), + new::wasmer::Extern::from_vm_export(store, export), ), }) .for_each(|((namespace, name), extern_)| {