In this section: Hands-On Examples
- Chapter 4 Feature Flag Evaluator Tutorial
- Chapter 5 Post Fetcher Runtime Tutorial
- Chapter 6 UMA Portability Lab Tutorial
- Chapter 7 Metadata Orchestration Tutorial
- Chapter 8 Service Graph Evolution Tutorial
- Chapter 9 Trust Boundaries Tutorial
- Chapter 10 Architectural Tradeoffs Tutorial
- Chapter 11 Evolution Without Fragmentation Tutorial
- Chapter 12 Discoverable Decisions Tutorial
- Chapter 13 Portable MCP Runtime Tutorial
Chapter 6 UMA code example
UMA portability lab tutorial
This tutorial proves portability through observable behavior. The native runner and WASI runner emit the same image.analyzed payload while target-specific telemetry remains explicit.
Use the links up front so the portability path feels like a guided sequence instead of a footer scavenger hunt.
What you will learn
- how one contract drives native and WASI execution
- why parity should be checked through emitted events
- how native-only capabilities stay outside the portable path
Prerequisites
- Rust 1.77 or newer
- rustup target add wasm32-wasip1
- Wasmtime 20 or newer
- jq
Run this setup command before the lab if your machine does not already have the target installed.
rustup target add wasm32-wasip1
Full tutorial
- Enter the example
cd chapter-06-portability-lab - List the guided labs
./scripts/list_labs.sh - Compare native and WASI events
./scripts/run_lab.sh lab1-native-wasm-parity - Compute shared payload digests
./scripts/run_lab.sh lab2-shared-payload-digest - Exercise failure paths and capability gates
./scripts/run_lab.sh lab3-failure-paths-and-capability-gates - Check Rust and TypeScript reference parity
./scripts/run_lab.sh lab4-rust-ts-reference-parity - Run the chapter smoke path
./scripts/smoke_portability_labs.sh
What to inspect
After each command, look for these proof points. They are the signals that connect the code example back to the UMA architecture claim.
- identical image.analyzed payloads
- matching shared payload digests
- gpu.telemetry.reported only on the native path
Acceptance check
The chapter-level validation path is:
./scripts/smoke_portability_labs.sh
Return to the repository root for the final acceptance gate:
cd ..
./scripts/smoke_reader_paths.sh
Where to go next
Chapter 7 uses contracts and events to create orchestration.