---
title: "Wasmtime | wasmCloud"
description: "WebAssembly runtime"
canonical: "https://wasmcloud.com/docs/v1/ecosystem/wasmtime/"
---

This is documentation for wasmCloud **v1**, which is no longer actively maintained.

For up-to-date documentation, see the **[latest version](https://wasmcloud.com/docs/)** (v2).

Version: v1

# Wasmtime

## Overview

The wasmCloud host serves as a runtime environment and uses [**Wasmtime**](https://wasmtime.dev/) as the underlying WebAssembly (Wasm) runtime. The runtime implements the virtual instruction set architecture (ISA) targeted by Wasm binaries.

Wasmtime is an open source WebAssembly runtime [hosted by the Bytecode Alliance](https://github.com/bytecodealliance/wasmtime) and designed for use either as part of a larger stack or as a standalone runtime, running across a variety of operating systems and architectures. Wasmtime supports the WebAssembly standard as well as the [WebAssembly System Interface (WASI)](https://wasmcloud.com/docs/v1/reference/glossary/#webassembly-system-interface-wasi) and the [Component Model](https://wasmcloud.com/docs/v1/reference/glossary/#the-component-model).

In wasmCloud, Wasmtime provides a flexible production-grade runtime designed for [defense-in-depth security](https://docs.wasmtime.dev/security.html#defense-in-depth).

![diagram of wasmCloud platform](https://wasmcloud.com/assets/images/wasmtime-platform-d8372192e0ec383961d4ba61eb68d8dd.png)

> **Compared to Kubernetes...**
>
> Wasmtime serves a similar role to a container runtime such as containerd on a Kubernetes node, but don't put too much weight on the analogy: components are not containers, and using a dedicated WebAssembly runtime enables wider ecosystem reuse.

## Using Wasmtime for local development

Components that run in wasmCloud will also run in Wasmtime with little or no configuration, since wasmCloud utilizes and maintains compatibility with standards like the Component Model, WASI, and WASI interfaces like `wasi-http`. In some cases, developers may wish to test components against standalone Wasmtime.

To install Wasmtime on Linux or macOS run:

shell

```shell
curl https://wasmtime.dev/install.sh -sSf | bash
```

Users on Windows and other operating systems can download Wasmtime from the GitHub repository's [Releases](https://github.com/bytecodealliance/wasmtime/releases) page.

For a simple example of running wasmCloud components with Wasmtime, you can create a new component from the "Hello world" template for any language:

shell

```shell
wash new component hello
```

Choose the language for your template, navigate into the project directory with `cd hello`, and then run:

shell

```shell
wash build
```

Now that you've built a simple HTTP component, you can run it using Wasmtime's `serve` subcommand:

shell

```shell
wasmtime serve -S cli=y build/http_hello_world_s.wasm
Serving HTTP on http://0.0.0.0:8080/
```

The `-S` argument enables you to configure Wasmtime's use of WASI, and `cli=y` enables support for WASI CLI APIs.

In a new terminal tab, you can `curl` against the component:

shell

```shell
curl localhost:8080
Hello from Rust!
```

The component functions exactly the same in Wasmtime as we would expect in wasmCloud.

## Composition and the runtime

WebAssembly components can be **composed**, meaning that they can be combined into a single component. Inside the encapsulating component, the constituent components link imports and exports, fulfilling one another's dependencies and otherwise communicating in order to execute the functionality of the greater application.

![composed component running on wasmtime](https://wasmcloud.com/assets/images/wasmtime-composed-e3e0e716a52721389c28cd1976db47fe.png) *Component foo and component bar were composed at build-time into a single component—when the composed component runs, Wasmtime resolves the links between components foo and bar.*

For more information, see [Linking Components](https://wasmcloud.com/docs/v1/concepts/linking-components/) and [Linking at Build](https://wasmcloud.com/docs/v1/concepts/linking-components/linking-at-build/).

## Further reading

- For more information, [see the Wasmtime documentation](https://docs.wasmtime.dev/).
- For more WebAssembly ecosystem tooling, see [Useful WebAssembly Tools](https://wasmcloud.com/docs/v1/ecosystem/useful-webassembly-tools/).

Last updated on **Jun 10, 2026** by **Liam Randall**
