Elements of WebAssembly - Wat, Wasm, and the JavaScript API

Chapter 1, What is WebAssembly?, described the history of WebAssembly and provided a high-level overview of the technology as well as the potential use cases and limitations. WebAssembly was described as being composed of multiple elements, not just the binary instruction format specified in the official definition.

In this chapter, we will dig into the elements that correspond to the official specifications created by the WebAssembly Working Group. We will examine the Wat and the binary format in greater detail to gain a better understanding of how they relate to modules. We will review the JavaScript API and Web API to ensure you're able to utilize the WebAssembly effectively in the browser.

Our goal for this chapter is to understand the following:

  • How the text and binary formats are related
  • What Wat is and where it fits in to the development process
  • The binary format and module (Wasm) file
  • The components of the JavaScript and Web API and how they relate to the Wasm module
  • How to utilize WasmFiddle to evaluate the phases of WebAssembly (C/C++ > Wat > Wasm)
..................Content has been hidden....................

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