mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-03 20:21:19 +00:00
26 lines
464 B
Rust
26 lines
464 B
Rust
|
use crate::runtime::{
|
||
|
vm,
|
||
|
backing::{LocalBacking, ImportBacking},
|
||
|
};
|
||
|
use std::sync::Arc;
|
||
|
|
||
|
pub struct Instance {
|
||
|
pub vmctx: vm::Ctx,
|
||
|
|
||
|
pub finalized_funcs: Box<[*const vm::Func]>,
|
||
|
|
||
|
pub backing: LocalBacking,
|
||
|
pub imports: ImportBacking,
|
||
|
|
||
|
pub module: Arc<Module>,
|
||
|
}
|
||
|
|
||
|
impl Instance {
|
||
|
pub fn new(module: Arc<Module>) -> Box<Instance> {
|
||
|
|
||
|
Box::new(Instance {
|
||
|
vmctx,
|
||
|
finalized_funcs
|
||
|
})
|
||
|
}
|
||
|
}
|