()
| 10 | "#; |
| 11 | |
| 12 | fn main() -> Result<()> { |
| 13 | let wasm = wat::parse_str(WASM).expect("failed to parse wat"); |
| 14 | let module = tinywasm::parse_bytes(&wasm)?; |
| 15 | let mut store = Store::default(); |
| 16 | let instance = ModuleInstance::instantiate(&mut store, &module, None)?; |
| 17 | let add = instance.func::<(i32, i64), (i32, i64)>(&store, "return")?; |
| 18 | |
| 19 | assert_eq!(add.call(&mut store, (1, 2))?, (1, 2)); |
| 20 | Ok(()) |
| 21 | } |
nothing calls this directly
no test coverage detected