Installation
This guide will help you install and set up Runwasi on your system.
Prerequisites
Before installing Runwasi, ensure you have the following prerequisites installed:
- Rust (stable)
- containerd
Additionally, check the contributing guide for detailed instructions on setting up your environment with all required dependencies.
Installation Methods
Option 1: Installing Prebuilt Binaries
The easiest way to get started is to download prebuilt binaries from the GitHub releases page.
-
Navigate to the releases page
-
Download the appropriate shim for your preferred WebAssembly runtime:
containerd-shim-wasmtime-v1
- for Wasmtime runtimecontainerd-shim-wasmedge-v1
- for WasmEdge runtimecontainerd-shim-wasmer-v1
- for Wasmer runtimecontainerd-shim-wamr-v1
- for WebAssembly Micro Runtime (WAMR)
-
Make the binary executable and move it to your PATH:
chmod +x containerd-shim-wasmtime-v1
sudo install containerd-shim-wasmtime-v1 /usr/local/bin/
- Verify the binary signature (recommended):
# Verify using cosign
cosign verify-blob \
--signature containerd-shim-wasmtime-v1.sig \
--certificate containerd-shim-wasmtime-v1.pem \
--certificate-identity https://github.com/containerd/runwasi/.github/workflows/action-build.yml@refs/heads/main \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
containerd-shim-wasmtime-v1
Option 2: Building from Source
To build and install Runwasi from source:
- Clone the repository:
git clone https://github.com/containerd/runwasi.git
cd runwasi
- Build the shim for your preferred runtime:
make build
Note:
make build
will only build shims for all runtimes. You can specify which runtime to build withmake build-wasmtime
,make build-wasmer
,make build-wasmedge
,make build-wamr
etc.
- Install the binary:
sudo make install
The make install
command copies the binary to $PATH
Testing Your Installation
After installation, you can test your setup by pulling and running a test image:
- Pull the test image:
sudo ctr pull ghcr.io/containerd/runwasi/wasi-demo-app:latest
- Run a test container:
sudo ctr run --rm --runtime=io.containerd.wasmtime.v1 ghcr.io/containerd/runwasi/wasi-demo-app:latest testwasm
You should see output from the demo application.
Next Steps
Now that you have runwasi shims installed, you can proceed to the Demos to learn how to run WebAssembly workloads with Runwasi.