Wasm I/O 2025: Getting Started with Wasmcloud

This repository contains everything you need to get started with the workshop:

👷 Workshop

In this workshop, we'll build two wasmCloud components:

  1. NuBase, an experimental database powered by Couchbase and written in Go.

  2. A simple HTTP server written in Rust, responding with a friendly greeting.

By the end of the workshop, we will:

  • Examine the HTTP & Couchbase native WebAssembly Interface Type ("WIT") interfaces
  • Build a HTTP API WebAssembly-native database component, powered by [Couchbase][couchbase] in Go
  • Build a HTTP server component in Rust
  • Run your database implementation locally with wasmCloud

📂 Organization

Here's a run-down of the files in this repository:

Folder Description
wit WIT definitions we'll be using during the talk
nubase Code for the Database component we'll finish as part of this workshop
hello Code for the HTTP server we'll build as part of this workshop

🌎 Environment setup

GitPod

Open in Gitpod

If using GitPod, you can launch .gitpod.yml file in this repository, and make an account at GitPod.io if necessary to get into an environment that "just works"!

GitHub Codespaces

Open in Codespaces

If using GitHub Codespaces, just click on the button above, and if you already have a GitHub account, you can get into an environment that "just works"!

Note

This link will open a Codespace in the workshop branch, which is the branch that contains incomplete code that we'll be building during the workshop.

Devcontainers

To use GitHub devcontainers to run this project, you can run

just start-devcontainer

Note

If you prefer to not use just, run devcontainer up --workspace-folder .

See Justfile for more recipes and the commands they run.

Manual/Local

To run manually, ensure that you have the following tools installed:

Dependency Description Easy install method
just Task runner (similar to GNU make) cargo install just
wash WAsmcloud SHell - a tool for managing wasmCloud instances cargo install wash-cli
wit-deps Manual downloading of WIT interfaces cargo install wit-deps-cli
wasm-tools WebAssembly toolkit (used during code generation) cargo install wasm-tools
tinygo TinyGo toolchain tingyo install guide
go Go toolchain go install guide
'rust' Rust toolchain rust install guide

You can easily check which tools are not installed by running:

just check

Once you have all required tools installed, you can build the project by running:

just build

Then, start Couchbase, using docker compose:

just start-couchbase

Deploy individual components using wash:

wash app deploy /path/to/component/wadm.yaml

From here, you can start developing the component:

just dev