June 2021
Intermediate to advanced
304 pages
7h 49m
English
AssemblyScript is a high-level language explicitly designed to compile to WebAssembly or WAT. AssemblyScript is more expressive than WAT but can compile to it. When you use AssemblyScript, you lose some of the fine optimization control that you have with WAT, but it’s much faster to write.
We’ll begin this chapter by creating a simple AddInts function, like the AddInt one we created in Chapter 1. We’ll write an AssemblyScript hello world app and compile it into WAT to see the WebAssembly that the AssemblyScript compiler generates. We’ll examine AssemblyScript’s use of length-prefixed strings, and then install the AssemblyScript ...
Read now
Unlock full access