---
title: "Quickstart — Build & Deploy Your First Wasm App | wasmCloud"
description: "Get started with wasmCloud — install wash, build a WebAssembly component, and deploy your first Wasm workload to Kubernetes in under 15 minutes."
canonical: "https://wasmcloud.com/docs/quickstart/"
---

Version: v2

# Quickstart

### Build WebAssembly (Wasm) applications and run them across any cloud, Kubernetes, datacenter, or edge.

In this tutorial:

- We'll use the **Wasm Shell (`wash`) CLI** to build a simple "Hello world" HTTP server application as a [WebAssembly (Wasm) component](https://wasmcloud.com/docs/overview/workloads/components/)—written in the language of your choice.
- Along the way, we'll start a **developer loop** that automatically deploys our application to a local wasmCloud environment.

A **WebAssembly (Wasm) component** is a portable, sandboxed binary (`.wasm` file) that implements the core logic of your application.

Components are compiled from your language of choice—Rust, TypeScript, Go, and others—and run inside the wasmCloud runtime, which mediates all access to system resources and external capabilities on their behalf.

## Install `wash`

First, we need to install the latest version of `wash` (**`2.13.0`**). If you've already installed `wash`, skip ahead to [Choose your language](https://wasmcloud.com/docs/quickstart/#choose-your-language).

**macOS and Linux**

**Install script**

In your terminal, run the installation script to download and install the latest version of `wash` (**`2.13.0`**):

shell

```shell
curl -fsSL https://wasmcloud.com/sh | bash
```

The script installs `wash` to `~/.wash/bin` and automatically updates your shell profile. Open a new terminal session to use `wash`.

**Customizing the install location**

To install to a different directory, set `INSTALL_DIR`:

shell

```shell
curl -fsSL https://wasmcloud.com/sh | INSTALL_DIR=/usr/local/bin bash
```

To skip automatic PATH modification (for example, if you manage your own dotfiles):

shell

```shell
curl -fsSL https://wasmcloud.com/sh -o install.sh && bash install.sh --no-modify-path
```

**Homebrew**

If you have [Homebrew](https://brew.sh/) installed, you can install `wash` with:

shell

```shell
brew install wasmcloud/wasmcloud/wash
```

Homebrew updates your PATH automatically. You're ready to use `wash` in any terminal session.

**Windows**

**Install script**

In PowerShell, run the installation script to download and install the latest version of `wash` (**`2.13.0`**):

powershell

```powershell
iwr -useb https://wasmcloud.com/ps1 | iex
```

The script installs `wash` to `%USERPROFILE%\.wash\bin` and automatically adds it to your user PATH. Open a new terminal session to use `wash`.

**Customizing the install location**

To install to a different directory, set `INSTALL_DIR`:

powershell

```powershell
$env:INSTALL_DIR = "C:\tools\wash"; iwr -useb https://wasmcloud.com/ps1 | iex
```

To skip automatic PATH modification:

powershell

```powershell
iwr -useb https://wasmcloud.com/ps1 -OutFile install.ps1; .\install.ps1 -NoModifyPath
```

**winget**

If you have [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/) installed, you can install `wash` with:

powershell

```powershell
winget install wasmCloud.wash
```

winget updates your PATH automatically. Open a new terminal session to use `wash`.

**Source**

You will need [`cargo`](https://doc.rust-lang.org/cargo/getting-started/installation.html) to install from source.

shell

```shell
git clone https://github.com/wasmcloud/wasmCloud.git
cd wasmCloud
cargo install --path crates/wash
```

Pre-built binaries for macOS, Linux, and Windows are [available on GitHub](https://github.com/wasmcloud/wasmCloud/releases).

In a new terminal, verify that `wash` is properly installed and check your version for **`2.13.0`** with:

bash

```bash
wash -V
```

If `wash` is installed correctly, you will see the version string printed, for example `wash 2.13.0`. Run `wash --help` to see all available commands and short descriptions for each.

## Choose your language

wasmCloud supports building WebAssembly components from any language that supports the [WASI P2 (also called WASI 0.2) target](https://wasmcloud.com/docs/overview/interfaces/#well-known-interfaces), including Go, Rust, TypeScript, and others.

`wash` depends on your local language toolchain for your language of choice.

- **Choose the language** you would like to use.
- **Install the toolchain** or verify that you have the correct versions.

**Rust**

**Install the Rust toolchain**

Requirements:

- [The Rust toolchain](https://www.rust-lang.org/tools/install) (always use the latest version)
- The `wasm32-wasip2` target for Rust

On macOS or Ubuntu/Debian, you can use the official install script to download `rustup`, which will automatically install the Rust toolchain:

shell

```shell
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

Once you've installed the Rust toolchain, use `rustup` to add the `wasm32-wasip2` target:

shell

```shell
rustup target add wasm32-wasip2
```

**TypeScript**

**Install the TypeScript toolchain**

Requirements:

- [Node.js](https://nodejs.org/en/learn/getting-started/how-to-install-nodejs) v18+
- [TypeScript](https://www.typescriptlang.org/) v5.6+

**macOS**

On macOS, you can use [Homebrew](https://brew.sh/) to install `npm` and Node.js. (See the [official Node.js documentation](https://nodejs.org/en/learn/getting-started/how-to-install-nodejs) for other options.)

shell

```shell
brew install node
```

**Ubuntu/Debian**

On Ubuntu, you can install `npm` (and Node.js) using the [Node Version Manager (`nvm`)](https://github.com/nvm-sh/nvm). (See the [official Node.js documentation](https://nodejs.org/en/learn/getting-started/how-to-install-nodejs) for other options.) You can download and install `nvm` using the official installation script:

shell

```shell
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
```

Once the script completes, you may need to start a new shell session.

You can use `nvm` to install the latest Long-Term Service version of `node`:

shell

```shell
nvm install --lts
```

**My language isn't listed**

If you prefer working in a language that isn't listed here, let us know!

Loading...

Once you've installed Node.js and `npm`, you can use `npm` to install TypeScript:

shell

```shell
npm install -g typescript
```

**My language isn't listed**

If you prefer working in a language that isn't listed here, let us know!

Loading...

## Create a new component

Now that we've installed `wash` and our language toolchain, it's time to create a new component project.

**Rust**

In your terminal, run:

shell

```shell
wash new https://github.com/wasmCloud/wasmCloud.git --name http-hello-world --subfolder templates/http-hello-world
```

This command...

- Creates a new project named `http-hello-world`...
- Based on a template found in the [`wasmCloud/wasmCloud`](https://github.com/wasmCloud/wasmCloud) Git repository...
- In the subfolder `templates/http-hello-world`.

Navigate to the `hello` project directory:

sh

```sh
cd http-hello-world
```

### Start your developer loop

We'll use [`watchexec`](https://github.com/watchexec/watchexec) to rebuild and redeploy our component whenever we save a source file. Install it once (see the [watchexec install guide](https://github.com/watchexec/watchexec#install) for other options):

shell

```shell
cargo install watchexec-cli
```

From our project directory, run:

shell

```shell
watchexec -c -r 'wash dev'
```

`watchexec` watches the project directory and restarts `wash dev` on every save (`-r` restarts the running command, `-c` clears the screen). `wash dev` **builds your WebAssembly component** and **deploys it to a local wasmCloud environment**. The terminal output should look like this:

text

```text
[Running: wash dev]
INFO starting development session for project path="."
INFO HTTP server listening addr=0.0.0.0:8000
INFO development session started, building and deploying component...
INFO listening for HTTP requests address=http://0.0.0.0:8000
```

By default, the application will run on our local port 8000. In a new terminal tab, we can `curl` our application:

shell

```shell
curl localhost:8000
```

The application should return:

text

```text
Hello from wasmCloud!
```

**TypeScript**

In your terminal, run:

shell

```shell
wash new https://github.com/wasmCloud/typescript.git --name http-hello-world --subfolder templates/http-hello-world-hono
```

This command...

- Creates a new project named `http-hello-world`...
- Based on a template found in the [`wasmCloud/typescript`](https://github.com/wasmCloud/typescript) Git repository...
- In the subfolder `templates/http-hello-world-hono`. This template uses the [Hono](https://hono.dev/) web framework for routing.

Navigate to the project directory:

sh

```sh
cd http-hello-world
```

### Start your developer loop

From our project directory, we'll run:

shell

```shell
npm run dev
```

The `npm run dev` command automatically **builds your WebAssembly component** and **deploys it to a local wasmCloud environment**. The last lines of the terminal output should look like this:

text

```text
OK Successfully written dist/http_hello_world_hono.wasm.
2026-02-06T15:35:03.588693Z  INFO listening for HTTP requests address=http://0.0.0.0:8000
```

By default, the application will run on our local port 8000. In a new terminal tab, we can `curl` our application:

shell

```shell
curl localhost:8000
```

The application should return:

text

```text
Hello from TypeScript!
```

You just ran a WebAssembly application in wasmCloud!

**My language isn't listed**

If you prefer working in a language that isn't listed here, let us know!

Loading...

## Make the application yours

Now we'll make a change to our code and see how the running application updates automatically.

**Rust**

The Rust code for our component is found in `src/lib.rs`.

Open the file in your code editor and change the "Hello" message on line 13. You might modify the message to say hello from WebAssembly, your own name, or whatever else you like.

rust

```rust
use wstd::http::{Body, Request, Response, StatusCode};

#[wstd::http_server]
async fn main(req: Request<Body>) -> Result<Response<Body>, wstd::http::Error> {
    match req.uri().path() {
        "/" => home(req).await,
        _ => not_found(req).await,
    }
}

async fn home(_req: Request<Body>) -> Result<Response<Body>, wstd::http::Error> {
    // Return a simple response with a string body
    Ok(Response::new("Hello from wasmCloud!\n".into()))
    Ok(Response::new("Hello from Wasm!\n".into()))
}

async fn not_found(_req: Request<Body>) -> Result<Response<Body>, wstd::http::Error> {
    Ok(Response::builder()
        .status(StatusCode::NOT_FOUND)
        .body("Not found\n".into())
        .unwrap())
}
```

**TypeScript**

The TypeScript code for our component is found in `src/component.ts`.

Open the file in your code editor and change the "Hello" message on line 7. You might change the message into a greeting from WebAssembly, your own name, or whatever else you like.

typescript

```typescript
import { Hono } from 'hono';
import { fire } from '@bytecodealliance/jco-std/wasi/0.2.x/http/adapters/hono/server';

const app = new Hono();

app.get('/', (c) => {
  return c.text('Hello from TypeScript!\n');
  return c.text('Hello from Wasm!\n');
});

app.notFound((c) => {
  return c.text('Not found\n', 404);
});

fire(app);

export { incomingHandler } from '@bytecodealliance/jco-std/wasi/0.2.x/http/adapters/hono/server';
```

**My language isn't listed**

If you prefer working in a language that isn't listed here, let us know!

Loading...

Save the modified file, then rebuild and redeploy the updated component:

**Rust**

`watchexec` detects the save and restarts `wash dev`, which rebuilds and redeploys the component. No manual restart needed.

**TypeScript**

The TypeScript template uses [`nodemon`](https://nodemon.io/) to watch your `src/` directory and automatically rebuild and redeploy on save. No restart needed.

In the terminal, `curl` the application again:

shell

```shell
curl localhost:8000
```

text

```text
Hello from Wasm!
```

## Next steps

We installed `wash`, built our first component, and ran our application locally.

In our next tutorial, we'll **add pluggable, reusable capabilities** like key-value storage to our application.

Last updated on **Nov 20, 2026** by **Victor Adossi**
