From e667ae4554e816b4081d874fc3564b07c28dbec6 Mon Sep 17 00:00:00 2001 From: Henry Date: Sun, 19 Apr 2026 17:48:32 +0200 Subject: feat: simplify module api Signed-off-by: Henry --- examples/simple.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/simple.rs') diff --git a/examples/simple.rs b/examples/simple.rs index 38839c9..a902b4c 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -1,5 +1,5 @@ use eyre::Result; -use tinywasm::{Module, Store}; +use tinywasm::{ModuleInstance, Store}; const WASM: &str = r#" (module @@ -12,9 +12,9 @@ const WASM: &str = r#" fn main() -> Result<()> { let wasm = wat::parse_str(WASM).expect("failed to parse wat"); - let module = Module::parse_bytes(&wasm)?; + let module = tinywasm::parse_bytes(&wasm)?; let mut store = Store::default(); - let instance = module.instantiate(&mut store, None)?; + let instance = ModuleInstance::instantiate(&mut store, &module, None)?; let add = instance.func::<(i32, i32), i32>(&store, "add")?; assert_eq!(add.call(&mut store, (1, 2))?, 3); -- cgit v1.3.1