Download Chapter 2: WEBASSEMBLY TEXT BASICS
Author and expert Rick Battagline eases you through all the technology’s complexities using clear explanations, illustrations, and plenty of examples. He’ll show you how to optimize and compile low-level code, as well as how to debug and evaluate WebAssembly, and represent WebAssembly in its human-readable format, WebAssembly Text (WAT) – skills that will set you apart from other programmers as WebAssembly expands into all modern architectures. Once you grasp the basics, you’ll build a collision-detection program to measure the performance of WebAssembly in Chrome and Firefox. You’ll also work with browser rendering technologies to create graphics and animations for your apps, and you’ll see how WebAssembly interacts with other web languages.
You’ll learn how to:
- Write web applications that use WebAssembly for optimal performance
- Debug WebAssembly code using a variety of tools, including browser debuggers
- Format variables, loops, functions, strings, data structures, and conditional logic in WAT
- Manipulate memory through WebAssembly, and build a program that spawns graphical objects randomly and detects when the objects collide
- Evaluate the output of a WebAssembly compiler (AssemblyScript)
This book doesn’t focus on any particular language toolchains, so the skills learned are applicable to whatever you’re working with.