use crate::interpreter::Memory;
#[cfg(any(test, feature = "test-helpers"))]
use crate::interpreter::MemoryInstance;
pub trait VmMemoryPool: Sync {
type Memory: Memory + Send + Sync + 'static;
fn get_new(&self) -> impl core::future::Future<Output = Self::Memory> + Send;
}
#[cfg(any(test, feature = "test-helpers"))]
#[derive(Default, Clone)]
pub struct DummyPool;
#[cfg(any(test, feature = "test-helpers"))]
impl VmMemoryPool for DummyPool {
type Memory = MemoryInstance;
fn get_new(&self) -> impl core::future::Future<Output = Self::Memory> + Send {
core::future::ready(MemoryInstance::new())
}
}