Manning Publications, 2019. — 448 p. — ISBN: 978-1-617295-74-4.
WebAssembly in Action introduces the WebAssembly stack and walks you through the process of writing and running browser-based applications. Expert developer Gerard Gallant gives you a firm foundation of the structure of a module, HTML basics, JavaScript Promises, and the WebAssembly JavaScript API.
About the TechnologyWrite high-performance browser-based applications without relying only on JavaScript! By compiling to the WebAssembly binary format, your C, C++, or Rust code runs at near-native speed in the browser. WebAssembly delivers greater speed, opportunities to reuse existing code, and access to newer and faster libraries. Plus, you can easily interact with JavaScript when you need to.
About the BookWebAssembly in Action teaches you how to write and run high-performance browser-based applications using C++ and other languages supported by WebAssembly. In it, you'll learn to create native WebAssembly modules, interact with JavaScript components, and maximize performance with web workers and pthreads. And you'll love how the clearly organized sections make it a breeze to find the important details about every function, feature, and technique.
What's insideDynamic linking of multiple modules at runtime
Communicating between modules and JavaScript
Debugging with WebAssembly Text Format
Threading with web workers and pthreads
Brief Table of Contents
First steps
Meet WebAssembly
A look inside WebAssembly modules
Creating your first WebAssembly module
Working with modules
Reusing your existing C++ codebase
Creating a WebAssembly module that calls into JavaScript
Creating a WebAssembly module that talks to JavaScript using function pointers
Advanced topicsDynamic linking: The basics
Dynamic linking: The implementation
Threading: Web workers and pthreads
WebAssembly modules in Node.js
Debugging and testing
WebAssembly text format
Debugging
Testing — and then what?