Deploy with crun
The crun project has WasmEdge support baked in. This chapter will walk you through deploying WASM images with crun.
The crun fedora package has WasmEdge as the default WebAssembly Runtime. So the easiest way to deploy WasmEdge with crun is on the Fedora Linux distribution. Please refer to the next section for the other Linux distributions.
First, install crun and WasmEdge on your fedora machine.
sudo dnf -y install wasmedge
sudo dnf -y install crun
crun -v to check if you installed successfully.
crun version 1.7.2
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
You can see that crun has WasmEdge package already.
Next, you can run WASM apps on your fedora machine.
Other Linux Platforms
The GitHub repo contains scripts and GitHub Actions for running our example apps on CRI-O.
- Simple WebAssembly example Quick start | Github Actions
- HTTP service example Quick start | Github Actions
Make sure you have installed WasmEdge
Build and configure crun with WasmEdge support
For now, the easiest approach is just built it yourself from source. First, let's ensure that
crun dependencies are installed on your Ubuntu 20.04. For other Linux distributions, please see here.
sudo apt update
sudo apt install -y make git gcc build-essential pkgconf libtool \
libsystemd-dev libprotobuf-c-dev libcap-dev libseccomp-dev libyajl-dev \
go-md2man libtool autoconf python3 automake
Next, configure, build, and install a
crun binary with WasmEdge support.
git clone https://github.com/containers/crun
sudo make install