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 derivative::Derivative;
use std::any::Any;
use wasmer_types::FunctionType;
pub enum VMExtern {
Function(InternalStoreHandle<VMFunction>),
Table(InternalStoreHandle<VMTable>),
Memory(InternalStoreHandle<VMMemory>),
Global(InternalStoreHandle<VMGlobal>),
}
#[derive(Derivative)]
#[derivative(Debug)]
pub struct VMFunction {
#[derivative(Debug = "ignore")]
pub anyfunc: MaybeInstanceOwned<VMCallerCheckedAnyfunc>,
pub signature: FunctionType,
pub kind: VMFunctionKind,
#[derivative(Debug = "ignore")]
pub host_data: Box<dyn Any>,
}