Overview

Appendix B. Required tools

This appendix serves as a concise setup guide for the tools used throughout the book, helping you align your environment with the authors’ configuration. It spans the Rust ecosystem and Wasm tooling, JavaScript and Python runtimes, container tooling with Docker, the Spin framework and plugins, versioned utilities for registries and performance testing, and supporting components for AI model execution and container-to-Wasm conversion. Consistent version pinning and simple verification steps are emphasized to ensure reproducible results while you follow along.

The Rust toolchain anchors the workflow: rustc 1.84.0 is the default (with some sections using 1.85.0), and targets include wasm32-unknown-unknown, wasm32-wasip1, and wasm32-wasip2. A set of Cargo-installed tools is used throughout, including cargo-component 0.20.0, wasm-tools 1.227.1, wasmtime-cli 30.0.0, wasi-virt at a specific revision, wac-cli 0.6.1, wasm_hex_dump 0.1.0, wash-cli (latest), oha 1.4.7, and wkg 0.10.0. Beyond Rust, Git LFS is required for large assets, and Docker is expected (either Engine or Desktop), with Docker 28.0.0 recommended and a reminder to confirm the installed version.

For the JS stack, nvm is used to install Node 22 and then the Wasm-related tools jco 1.10.2 and componentize-js 0.17.0; the Python examples target Python 3.12.3. Spin is installed and pinned to 3.2.0, with the kube plugin added for Kubernetes deployments (example plugin versions include cloud 0.11.0 and kube 0.4.0). The appendix also covers setting up Ollama and pulling the book’s model, installing regctl (noting a 0.8.0 version via snap on Ubuntu), and obtaining container2wasm v0.8.3 with guidance for the correct CPU architecture, placement of binaries on PATH, permission fixes, version checks, and cleanup.

B.10 Kubernetes setup

Start by installing k3d, a Docker-based local Kubernetes cluster tool. It’s fast, lightweight, and great for dev/testing.

Next, install kubectl to interact with your cluster: https://kubernetes.io/docs/tasks/tools/.

We use:

Then install Helm by following: https://helm.sh/docs/intro/install/.

We use:

FAQ

How do I install Rust and match the versions used in the book?Install Rust from https://www.rust-lang.org/learn/get-started. The book uses rustc 1.84.0 (and 1.85.0 for some Spin sections). Use rustup to install and switch versions:
rustup install 1.84.0
rustup default 1.84.0

# (optional for Spin sections)
rustup install 1.85.0
# swap when needed
rustup default 1.85.0
Which Rust targets do I need for WebAssembly, and how do I add them?Add these targets with rustup:
rustup target add wasm32-unknown-unknown
rustup target add wasm32-wasip1
rustup target add wasm32-wasip2
Which Cargo-based tools should I install, and what are the exact commands?Install the following tools as used in the book:
  • Cargo component: cargo install cargo-component@0.20.0 --locked
  • Wasm tools: cargo install wasm-tools@1.227.1 --locked
  • Wasmtime: cargo install wasmtime-cli@30.0.0 --locked
  • WASI-Virt: cargo install wasi-virt --git https://github.com/bytecodealliance/WASI-Virt --rev b662e419 --locked
  • WAC: cargo install --locked wac-cli@0.6.1
  • Wasm Hex Dump: cargo install wasm_hex_dump@0.1.0 --locked
  • Wash: cargo install --locked wash-cli
  • Oha: cargo install oha@1.4.7 --locked
  • Wkg: cargo install wkg@0.10.0 --locked
How do I install Git LFS?Follow the instructions at https://git-lfs.com/.
What’s the recommended way to install Docker, and which version should I use?Install either:
  • Docker Engine (CLI-focused): https://docs.docker.com/engine/install/
  • Docker Desktop (GUI + Engine): https://docs.docker.com/desktop/
Recommended version: Docker 28.0.0 (build f9ced58). Verify with:
docker --version
How do I set up Node.js and the JavaScript Wasm toolchain (jco and componentize-js)? If you’re on Linux, macOS, or WSL:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash
# restart your terminal
nvm install 22
If you’re on Windows, use nvm-windows: https://github.com/coreybutler/nvm-windows Then install the JS Wasm tools:
npm install -g @bytecodealliance/jco@1.10.2
npm install -g @bytecodealliance/componentize-js@0.17.0
Which Python version does the book use, and where do I download it?The book uses Python 3.12.3. Download/install via https://wiki.python.org/moin/BeginnersGuide/Download.
How do I install Spin and the Kubernetes plugin used in the book?Install Spin: https://developer.fermyon.com/spin/v3/install The book uses spin 3.2.0 (c9be6d8 2025-03-24). For Kubernetes deployments, install the plugin:
spin plugins update
spin plugins install kube
spin plugins list --installed
You should see output similar to:
cloud 0.11.0 [installed]
kube 0.4.0 [installed]
How do I install Ollama and pull the model used in the book?Install Ollama from https://ollama.com/ and then pull the model:
ollama pull gurubot/tinystories-656k-q8
How do I install container2wasm on Linux and verify it works? Download the release (example: Linux amd64 v0.8.3):
wget https://github.com/container2wasm/container2wasm/releases/download/v0.8.3/container2wasm-v0.8.3-linux-amd64.tar.gz
Note: On arm64, replace amd64 with arm64. See all releases: https://github.com/container2wasm/container2wasm/releases Extract, move to PATH, and make executable:
tar -xvf container2wasm-v0.8.3-linux-amd64.tar.gz
sudo mv c2w c2w-net /usr/local/bin/
chmod +x /usr/local/bin/c2w /usr/local/bin/c2w-net
Verify and clean up:
c2w --version
# expected: c2w version v0.8.3
rm container2wasm-v0.8.3-linux-amd64.tar.gz

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Server-Side WebAssembly ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Server-Side WebAssembly ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Server-Side WebAssembly ebook for free