chapter one

1 Introducing Wasm on the server

 

This chapter covers

  • The evolution of Wasm from a browser-based tool to a versatile technology for server-side development
  • The key attributes of Wasm: Performance, security, and flexibility
  • Practical scenarios where Wasm excels
  • The limitations and challenges of adopting Wasm in server-side development

WebAssembly, commonly abbreviated as Wasm, is a construct that is akin to an instruction set architecture (ISA) like x86_64, aarch64 (also known as arm64), and others. In the same way you can compile your code to such architectures, you can compile your code to Wasm. But, unlike x86_64 or aarch64, you can’t go to the store and buy a computer that contains a Wasm chip. Wasm is not a real or physical platform. As illustrated in figure 1.1, it can be thought of as an entirely agnostic hardware abstraction layer over the hardware itself. Wasm can then be transformed into native code for the specific hardware it is running on. In fact, one of Wasm’s goals is to serve as a common denominator across different ISAs.

Figure 1.1 Wasm as an abstraction layer virtualizing over various kinds of hardware
A screenshot of a phone

AI-generated content may be incorrect.

1.1 What is the server side and where does Wasm fit in?

1.2 The advantages of Wasm for server-side development

1.2.1 Language agnosticism

1.2.2 Performance

1.2.3 Hardware agnosticism

1.2.4 Security

1.2.5 Standards-based and vendor neutrality

1.3 When and where to use Wasm (and when not to)

1.4 How to navigate this book

Summary