liveBook · Manning

What you will learn in Server-Side WebAssembly

Building portable and secure multi-language apps

by Danilo Chiarlone
Foreword by Brendan Burns
Afterword by Luke Wagner

Chapter by chapter

Chapter 1: Introducing Wasm on the server

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 · 1.5 Summary

What you learn in chapter 1 →

Chapter 2: Building server-side applications with Wasm modules

2.1 Understanding Wasm’s building blocks · 2.2 Understanding the guest-host architecture of server-side Wasm · 2.3 Creating a Wasm app using Rust · 2.3.1 Creating a Rust library project · 2.3.2 Specifying compilation to a Wasm module · 2.3.3 Writing the code for our application · 2.3.4 Compiling the Rust code into a Wasm module · 2.3.5 Executing the Wasm module with the custom host · 2.3.6 Reflecting on the “Hello, World” application · 2.4 Building on Wasm’s simple types with WebAssembly Interface Types · 2.5 Building the foundation of a smart content management system · 2.6 Summary

What you learn in chapter 2 →

Chapter 3: Enhancing portability and security with Wasm components

3.1 Benefits of Wasm components · 3.1.1 Cross-language portability · 3.1.2 Shared-nothing security · 3.1.3 Only-what-you-need security and improved vulnerability mitigation response · 3.2 Building a componentized “Hello, World” guest application with JavaScript · 3.2.1 Setting up the project and installing the toolchain · 3.2.2 Implementing the component logic · 3.2.3 Compiling the Wasm component · 3.3 Building a Python host for a JavaScript-bundled Wasm component · 3.3.1 Setting up the project and installing the toolchain · 3.3.2 Implementing the host logic · 3.3.3 Running the Python host · 3.4 Expanding the example project with Wasm components · 3.4.1 Improving the WIT file for the key-value store · 3.4.2 Creating the SmartCMS host · 3.4.3 Implementing and running a guest Wasm component inside our SmartCMS host · 3.5 Summary

What you learn in chapter 3 →

Chapter 4: Interfacing Wasm with the underlying system

4.1 The WebAssembly System Interface · 4.2 What can you build with WASI? · 4.2.1 Creating a CLI application · 4.2.2 Creating libraries · 4.2.3 Creating HTTP proxies · 4.3 Converting a Wasm module to a Wasm component · 4.4 Managing component capabilities · 4.5 Composing components together · 4.6 Expanding our example project with WASI and composability · 4.7 Summary

What you learn in chapter 4 →

Chapter 5: From machine learning to databases: Applications of Wasm

5.1 WebAssembly Standard Interfaces · 5.2 Machine learning with Wasm · 5.2.1 Understanding ML inference · 5.2.2 Using wasi-nn · 5.3 Running Wasm inside databases · 5.3.1 Making Wasm UDFs · 5.3.2 Getting Wasm into SQL · 5.3.3 Running Wasm UDFs in libSQL · 5.4 Improving our example project with wasi-nn · 5.4.1 Setting up our project · 5.4.2 Writing the ML Wasm component · 5.4.3 Updating our host to use ONNX for wasi:nn · 5.5 Summary

What you learn in chapter 5 →

Chapter 6: Creating production-grade Wasm applications

6.1 Creating a wasmCloud “Hello, World” application · 6.2 Adding persistent storage to our Wasm app · 6.2.1 Modifying our WIT and wadm manifest · 6.2.2 Modifying our application and redeploying it · 6.3 Scaling our wasmCloud application · 6.4 Distributing our wasmCloud application · 6.5 Another off-the-shelf host: Spin · 6.5.1 Creating a Spin “Hello, World” application · 6.5.2 Comparing wasmCloud and Spin · 6.6 Implementing the example project as a wasmCloud app · 6.6.1 Adding persistent storage to the SmartCMS · 6.6.2 Adding machine learning to the SmartCMS · 6.7 Summary

What you learn in chapter 6 →

Chapter 7: Introducing Wasm containers

7.1 Containers vs. Wasm · 7.2 Wasm containers · 7.3 Running a Wasm container · 7.3.1 Setting up containerd and Wasm support · 7.3.2 Building and running the Wasm container · 7.4 Wasm and the OCI · 7.4.1 Packaging and publishing Wasm components as OCI images · 7.4.2 Inspecting Wasm component OCI images · 7.4.3 Pulling and running Wasm OCI images · 7.5 wasmCloud and Wasm containers · 7.6 Converting Linux containers to Wasm · 7.6.1 Introducing container2wasm · 7.6.2 Installing container2wasm · 7.6.3 Using container2wasm · 7.7 Summary

What you learn in chapter 7 →

Chapter 8: Scalability for Wasm with Kubernetes

8.1 Kubernetes and Wasm · 8.2 Running Wasm in Kubernetes with SpinKube · 8.2.1 Preparing the cluster for SpinKube · 8.2.2 Running a Wasm app in Kubernetes with SpinKube · 8.2.3 Scaling Wasm in Kubernetes with SpinKube · 8.3 Running Wasm in Kubernetes with wasmCloud · 8.3.1 Preparing the cluster for wasmCloud · 8.3.2 Running a Wasm app in Kubernetes with wasmCloud · 8.4 Running the SmartCMS example on Kubernetes · 8.4.1 Preparing the SmartCMS image and manifest · 8.4.2 Preparing the Ollama dependency · 8.4.3 Running the app · 8.5 Summary

What you learn in chapter 8 →

Chapter 9: The future of Wasm

9.1 SmartCMS closing remarks · 9.2 What’s next for Wasm? · 9.2.1 Confidential computing · 9.2.2 AI and machine learning · 9.2.3 Compute at the edge · 9.3 What’s next for WASI? · 9.4 Staying in the loop · 9.5 Summary

What you learn in chapter 9 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.