mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-12 21:38:39 +00:00
feat(deprecated) Wrap a new module.
This commit is contained in:
@@ -1,9 +1,4 @@
|
|||||||
mod new {
|
use crate::{new, types::Value};
|
||||||
pub(crate) use wasm_common::entity::EntityRef;
|
|
||||||
pub(crate) use wasmer::Instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
use crate::types::Value;
|
|
||||||
use std::{convert::Infallible, error::Error};
|
use std::{convert::Infallible, error::Error};
|
||||||
|
|
||||||
pub struct Instance {
|
pub struct Instance {
|
||||||
@@ -14,7 +9,7 @@ pub struct Instance {
|
|||||||
pub module: (),
|
pub module: (),
|
||||||
// TODO
|
// TODO
|
||||||
//pub exports: Exports,
|
//pub exports: Exports,
|
||||||
pub(crate) new_instance: new::Instance,
|
pub(crate) new_instance: new::wasmer::Instance,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Instance {
|
impl Instance {
|
||||||
@@ -39,7 +34,7 @@ impl Instance {
|
|||||||
note = "Please use `instance.module().info().resolve_func(name)` instead."
|
note = "Please use `instance.module().info().resolve_func(name)` instead."
|
||||||
)]
|
)]
|
||||||
pub fn resolve_func(&self, name: &str) -> Result<usize, ()> {
|
pub fn resolve_func(&self, name: &str) -> Result<usize, ()> {
|
||||||
use self::new::EntityRef;
|
use new::wasm_common::entity::EntityRef;
|
||||||
|
|
||||||
self.new_instance
|
self.new_instance
|
||||||
.module()
|
.module()
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
mod instance;
|
mod instance;
|
||||||
pub mod types;
|
pub mod types;
|
||||||
|
|
||||||
|
mod new {
|
||||||
|
pub(crate) use wasm_common;
|
||||||
|
pub(crate) use wasmer;
|
||||||
|
}
|
||||||
|
|
||||||
pub use crate::instance::Instance;
|
pub use crate::instance::Instance;
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
mod new {
|
use crate::new;
|
||||||
pub(crate) use wasmer::Val;
|
|
||||||
}
|
|
||||||
|
|
||||||
pub type Value = new::Val;
|
pub type Value = new::wasmer::Val;
|
||||||
|
|||||||
Reference in New Issue
Block a user