smg-wasm 1.1.0

WebAssembly runtime and module management for Shepherd Model Gateway
Documentation
//! WebAssembly (WASM) module support for Shepherd Model Gateway
//!
//! This crate provides WASM component execution capabilities using the WebAssembly Component Model.
//! It supports middleware execution at various attach points (OnRequest, OnResponse) with async support.

pub mod config;
pub mod errors;
pub mod module;
pub mod module_manager;
pub mod runtime;
pub mod spec;
#[cfg(feature = "storage-hooks")]
pub mod storage_hook;
#[cfg(feature = "storage-hooks")]
mod storage_spec;
pub mod types;

// Re-export commonly used types
pub use config::WasmRuntimeConfig;
pub use errors::{Result, WasmError, WasmManagerError, WasmModuleError, WasmRuntimeError};
pub use module::{
    MiddlewareAttachPoint, WasmMetrics, WasmModule, WasmModuleAddRequest, WasmModuleAddResponse,
    WasmModuleAddResult, WasmModuleAttachPoint, WasmModuleDescriptor, WasmModuleListResponse,
    WasmModuleMeta, WasmModuleType,
};
pub use module_manager::WasmModuleManager;
pub use runtime::WasmRuntime;
pub use spec::{apply_modify_action_to_headers, build_wasm_headers_from_axum_headers, smg, Smg};
#[cfg(feature = "storage-hooks")]
pub use storage_hook::WasmStorageHook;
pub use types::{WasiState, WasmComponentInput, WasmComponentOutput};