mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-10 22:58:18 +00:00
feat(deprecated) Implement LikeNamespace for Instance.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::{module::Module, new, structures::TypedIndex, types::Value};
|
||||
use crate::{import::LikeNamespace, module::Module, new, structures::TypedIndex, types::Value};
|
||||
use std::error::Error;
|
||||
|
||||
pub use new::wasmer::Exports;
|
||||
@@ -51,3 +51,13 @@ impl Instance {
|
||||
Module::new(self.new_instance.module().clone())
|
||||
}
|
||||
}
|
||||
|
||||
impl LikeNamespace for Instance {
|
||||
fn get_namespace_export(&self, name: &str) -> Option<new::wasmer_runtime::Export> {
|
||||
self.exports.get_namespace_export(name)
|
||||
}
|
||||
|
||||
fn get_namespace_exports(&self) -> Vec<(String, new::wasmer_runtime::Export)> {
|
||||
self.exports.get_namespace_exports()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user