Skip to content

Commit

Permalink
automate host-binding
Browse files Browse the repository at this point in the history
  • Loading branch information
konsumer committed Jul 8, 2024
1 parent eff41b4 commit d7bbbae
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test.htm
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@
return out
}


const importObj = getImports(await loadHost())
const cart = (await WebAssembly.instantiateStreaming(fetch("./build/wasm_shared-cart.wasm"), importObj)).instance.exports

const cart = (await WebAssembly.instantiateStreaming(fetch("./build/wasm_shared-cart.wasm"), getImports(await loadHost()))).instance.exports

// call cart's test, which will call host's logtest
cart.test()
Expand Down

0 comments on commit d7bbbae

Please sign in to comment.