diff options
| author | Henry Gressmann <mail@henrygressmann.de> | 2023-12-03 23:51:59 +0100 |
|---|---|---|
| committer | Henry Gressmann <mail@henrygressmann.de> | 2023-12-03 23:51:59 +0100 |
| commit | a4d2df2255a026be4bb8a46209de2e6d75410a70 (patch) | |
| tree | c940324757ce19d02ff6dba2ed75cc00783b6469 /crates/cli/bin.rs | |
| parent | d1c1e5c6adb85effbd29a82ebde76681468e2504 (diff) | |
chore: refactoring
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/cli/bin.rs')
| -rw-r--r-- | crates/cli/bin.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/cli/bin.rs b/crates/cli/bin.rs index 015f34a..ce33544 100644 --- a/crates/cli/bin.rs +++ b/crates/cli/bin.rs @@ -82,9 +82,9 @@ fn run(wasm: &[u8]) -> Result<()> { let mut store = tinywasm::Store::default(); let module = tinywasm::Module::parse_bytes(wasm)?; - let instance = module.instantiate(&mut store)?; + let mut instance = module.instantiate(&mut store)?; - let func = instance.get_func(&mut store, "add")?; + let mut func = instance.get_func(&mut store, "add")?; let params = vec![WasmValue::I32(2), WasmValue::I32(2)]; let res = func.call(&mut store, params)?; info!("{res:?}"); |
