September 2018
Intermediate to advanced
328 pages
9h 10m
English
We demonstrated how to call a function in a Wasm instance from JavaScript in the previous chapter, but that was assuming you instantiated a module in the browser with no glue code. Emscripten provides the ability to call functions from the Wasm instance as well. After a module is instantiated, you call functions by invoking them from the instance.exports object, which is accessible from the result of the resolved Promise. MDN's documentation provides the following function signature for WebAssembly.instantiateStreaming:
Promise<ResultObject> WebAssembly.instantiateStreaming(source, importObject);
Read now
Unlock full access