linera_wasmer_vm/
export.rs1use crate::global::VMGlobal;
5use crate::memory::VMMemory;
6use crate::store::InternalStoreHandle;
7use crate::table::VMTable;
8use crate::vmcontext::VMFunctionKind;
9use crate::{MaybeInstanceOwned, VMCallerCheckedAnyfunc};
10use derivative::Derivative;
11use std::any::Any;
12use wasmer_types::FunctionType;
13
14#[cfg_attr(feature = "artifact-size", derive(loupe::MemoryUsage))]
16pub enum VMExtern {
17 Function(InternalStoreHandle<VMFunction>),
19
20 Table(InternalStoreHandle<VMTable>),
22
23 Memory(InternalStoreHandle<VMMemory>),
25
26 Global(InternalStoreHandle<VMGlobal>),
28}
29
30#[derive(Derivative)]
32#[derivative(Debug)]
33pub struct VMFunction {
34 #[derivative(Debug = "ignore")]
37 pub anyfunc: MaybeInstanceOwned<VMCallerCheckedAnyfunc>,
38
39 pub signature: FunctionType,
41
42 pub kind: VMFunctionKind,
45
46 #[derivative(Debug = "ignore")]
48 pub host_data: Box<dyn Any>,
49}