feat(deprecated) Implement LikeNamespace for Instance.

This commit is contained in:
Ivan Enderlin
2020-06-09 11:02:47 +02:00
parent 4919b2793e
commit ba7f6f7679

View File

@@ -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()
}
}