1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
use crate::global::VMGlobal;
use crate::memory::VMMemory;
use crate::store::InternalStoreHandle;
use crate::table::VMTable;
use crate::vmcontext::VMFunctionKind;
use crate::{MaybeInstanceOwned, VMCallerCheckedAnyfunc};
use std::any::Any;
use wasmer_types::FunctionType;
pub enum VMExtern {
Function(InternalStoreHandle<VMFunction>),
Table(InternalStoreHandle<VMTable>),
Memory(InternalStoreHandle<VMMemory>),
Global(InternalStoreHandle<VMGlobal>),
}
pub struct VMFunction {
pub anyfunc: MaybeInstanceOwned<VMCallerCheckedAnyfunc>,
pub signature: FunctionType,
pub kind: VMFunctionKind,
pub host_data: Box<dyn Any>,
}