mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-11 07:08:21 +00:00
feat(deprecated) Port DynFunc and Instance::dyn_func.
This commit is contained in:
@@ -8,6 +8,8 @@ use std::{
|
||||
rc::Rc,
|
||||
};
|
||||
|
||||
pub use crate::typed_func::DynamicFunc as DynFunc;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct PreInstance {
|
||||
pub(crate) vmctx: Rc<RefCell<vm::Ctx>>,
|
||||
@@ -56,6 +58,10 @@ impl Instance {
|
||||
Err(())
|
||||
}
|
||||
|
||||
pub fn dyn_func(&self, name: &str) -> Result<DynFunc, ExportError> {
|
||||
self.exports.get(name)
|
||||
}
|
||||
|
||||
pub fn resolve_func(&self, name: &str) -> Result<usize, ()> {
|
||||
self.new_instance
|
||||
.module()
|
||||
|
||||
Reference in New Issue
Block a user