pub use wasmtime::*;
pub async fn new_module_async(engine: &Engine, bytes: impl AsRef<[u8]>) -> Result<Module> {
Module::new(engine, bytes)
}
pub async fn new_instance_async(
store: impl AsContextMut,
module: &Module,
imports: &[Extern],
) -> Result<Instance> {
Instance::new(store, module, imports)
}
pub async fn instantiate_async<T>(
store: impl AsContextMut<Data = T>,
linker: &Linker<T>,
module: &Module,
) -> Result<Instance> {
linker.instantiate(store, module)
}
#[cfg(feature = "component-model")]
pub mod component {
pub use wasmtime::component::*;
pub use wasm_bridge_macros::bindgen_sys as bindgen;
pub use wasm_bridge_macros::flags_sys as flags;
pub use wasm_bridge_macros::ComponentType;
pub use wasm_bridge_macros::Lift;
pub use wasm_bridge_macros::Lower;
pub async fn new_component_async(
engine: &wasmtime::Engine,
bytes: impl AsRef<[u8]>,
) -> wasmtime::Result<Component> {
Component::new(engine, bytes)
}
}
#[cfg(feature = "async")]
pub use async_trait::async_trait;