Wasm Runtime Support in Docker Desktop
Tags: webassembly, docker, developers, containers
Published: 2023-07-09 12:11:28


[Docker Desktop](https://docs.docker.com/desktop/), a popular platform for building and running containerized applications, provides support for running WebAssembly (Wasm) workloads through the installation of specific runtimes. When you install Docker Desktop, it automatically downloads and installs the following runtimes that can be used to run Wasm workloads:


- WasmEdge
- Slight(from Deislabs)
- Spin
- wasmtime(from Bytecode Alliance)

Pleae note that the Wasm feature is currently in Beta. It is not recommended for the production environments 


## 1. io.containerd.wasmedge.v1

"Wasmedge" is a runtime built for executing WebAssembly modules. It offers high performance, low resource consumption, and supports multiple language runtimes and execution modes.

[WasmEdge](https://wasmedge.org/docs/develop/overview/) is a lightweight, high-performance, and extensible WebAssembly runtime for cloud native, edge, and decentralized applications. It powers serverless apps, embedded functions, microservices, udf, smart contracts, and IoT devices. WasmEdge is currently a CNCF (Cloud Native Computing Foundation) Sandbox project.

WasmEdge could be integrated with the existing cloud native infra seamlessly. So developers can leverage container tools such as Kubernetes, Docker and CRI-O to deploy, manage, and run lightweight WebAssembly applications. 


## 2.  io.containerd.slight.v1

This runtime, called "slight," is an experimental runtime for WebAssembly workloads. It focuses on lightweight execution and efficient resource utilization.

## 3. io.containerd.spin.v1

The "spin" runtime is another experimental runtime specifically designed for running WebAssembly modules. It aims to provide a secure and isolated execution environment for Wasm applications.


## 4. io.containerd.wasmtime.v1

The "wasmtime" runtime is a high-performance, standalone WebAssembly runtime that provides a secure and efficient execution environment. It supports running WebAssembly modules with different language environments and provides various APIs for interacting with the runtime.

These runtimes enable Docker Desktop users to leverage the capabilities of WebAssembly and execute Wasm workloads within Docker containers. With the support for these runtimes, developers can build and deploy applications using different Wasm frameworks and languages, benefiting from the performance and portability advantages offered by WebAssembly technology.


## Getting Started

- [Install Docker Desktop](https://docs.docker.com/desktop/install/mac-install/)

- Click "Settings" and Select "Features in Development"


![Image2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lktaawd1k7lizjxbb6nj.png)


## Installing Wasm Runtimes

- Select "Use containerd for pulling and storing images" and enable Wasm.

The Containerd option turns on the experimental containerd image store. This brings new features like:
- Faster container startup performance by lazy-pulling images
- Multi-platform images

The Wasm option installs runtimes that lets you run Wasm workloads⁠.


![Image3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s4xvc42ath0m91vkyxll.png)