pub trait WasmModule:
Send
+ Sync
+ 'static {
// Required methods
fn exports(&self) -> Vec<String>;
fn as_any(&self) -> &dyn Any;
}Expand description
A compiled (but not yet instantiated) WASM module.
Created by WasmHost::compile. Implementors must also expose as_any()
so the host can downcast &dyn WasmModule back to its concrete type during
WasmHost::instantiate.
Send + Sync are required so compiled modules can be wrapped in Arc and
shared across actor factory closures (which must be Send + Sync + 'static).