Overview of the code

The example application isn't much of an application. It's a simple form that accepts two input values and returns the sum or difference of these two values. The add and subtract operations are each exported from their own Wasm module instantiated in a worker thread. The example may be contrived, but it effectively demonstrates how to integrate WebAssembly into Web Workers.

The code for this section is located in the /chapter-10-advanced-tools/parallel-wasm directory of the learn-webassembly repository. The following sections walk through each section of the code base and describe how to build the application from scratch. If you wish to follow along, create a folder in your /book-examples directory named /parallel-wasm.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset