---
title: "Hello World | wasmCloud"
description: "Get started with wasmCloud: build and run your first WebAssembly component in minutes using wash."
canonical: "https://wasmcloud.com/docs/v1/tour/hello-world/"
---

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

# Quickstart

wasmCloud enables you to **build polyglot applications** out of reusable [WebAssembly (Wasm) components](https://wasmcloud.com/docs/v1/concepts/components/) and **run them everywhere**—across any cloud, Kubernetes, datacenter, or edge.

In this tutorial:

- We'll use the **wasmCloud Shell (`wash`) CLI** to build a simple "Hello world" HTTP server application from a **WebAssembly component**—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.

## Install `wash`

First, we need to install the latest version of `wash`.

**macOS**

On macOS, you can use [Homebrew](https://brew.sh/) to install `wash`:

shell

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

**Ubuntu and Debian**

On Ubuntu and Debian Linux, you can use `apt` to install `wash`:

shell

```shell
curl -s https://packagecloud.io/install/repositories/wasmcloud/core/script.deb.sh | sudo bash
```

shell

```shell
sudo apt install wash
```

**Windows**

For the smoothest experience, we recommend that Windows users run wasmCloud with **Windows Subsystem for Linux (WSL)** and follow the **Ubuntu/Debian** instructions throughout this guide.

Microsoft provides [documentation for getting started with WSL](https://learn.microsoft.com/en-us/windows/wsl/install) and [using WSL with Visual Studio Code](https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-vscode).

When using WSL, we recommend choosing the `Ubuntu` distro (`wsl --install -d Ubuntu`).

You may need to update `git` to the latest version using the Ubuntu Git Maintainers' Personal Package Archive (PPA):

shell

```shell
sudo add-apt-repository ppa:git-core/ppa
```

shell

```shell
sudo apt-get update
```

shell

```shell
sudo apt-get install git
```

When your WSL environment is ready, you can use the standard Ubuntu/Debian installation method:

shell

```shell
curl -s https://packagecloud.io/install/repositories/wasmcloud/core/script.deb.sh | sudo bash
```

shell

```shell
sudo apt install wash
```

If you are unable to use WSL, you can find native Windows installation instructions on the [Installation](https://wasmcloud.com/docs/v1/installation/) page, but note that native Windows support is experimental.

We support other package managers and the option to install from source. If you'd like to use a different installation method, see the [**Installation**](https://wasmcloud.com/docs/v1/installation/) page.

Verify that `wash` is installed by running:

shell

```shell
wash --version
```

## Choose your language

wasmCloud supports building WebAssembly components from any language that supports the [WASI 0.2 target](https://wasmcloud.com/docs/v1/concepts/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.

**Go**

**Install the Go toolchain**

Requirements:

- [Go](https://go.dev/doc/install) 1.23.0+
- [TinyGo](https://tinygo.org/getting-started/install/) (always use the latest version):
- [`wasm-tools`](https://github.com/bytecodealliance/wasm-tools#installation) **v1.225.0**

> **Warning**
>
> Due to incompatibilities introduced in `wasm-tools` v1.226.0 and higher, **we strongly recommend using `wasm-tools` v1.225.0** when building Go projects. The easiest way to download `wasm-tools` v1.225.0 is via [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html): `cargo install --locked wasm-tools@1.225.0`

**macOS**

On macOS, you can use [Homebrew](https://brew.sh/) to install the Go toolchain. (See the [official Go documentation](https://go.dev/doc/install) for other options.)

shell

```shell
brew install go
```

shell

```shell
brew install tinygo-org/tools/tinygo
```

**You will also need the `wasm-tools` utility.**

**Ubuntu/Debian**

On Ubuntu/Debian, Go 1.23+ isn't currently available via major package managers, but you can use `curl` or `wget` to download the Go toolchain from the [official Go download page](https://go.dev/dl/). (See the [official Go documentation](https://go.dev/doc/install) for other options.)

Before downloading, ensure that you do not have a previous version of Go installed. You can find an existing installation in the `/usr/local/go` directory.

Consult the [download page](https://go.dev/dl/) and set environment variables specifying the appropriate version and architecture for your system. (The values below are examples.)

shell

```shell
export GO_VERSION="1.23.4"
```

shell

```shell
export GO_ARCH="amd64"
```

Download your file:

shell

```shell
curl -O -L "https://golang.org/dl/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz"
```

Find the appropriate checksum value for your file on the [download page](https://go.dev/dl/) and validate the file. (The example below uses the checksum value for the v1.23.4 on `amd64` download.)

shell

```shell
echo -n "6924efde5de86fe277676e929dc9917d466efa02fb934197bc2eba35d5680971 *go${GO_VERSION}.linux-${GO_ARCH}.tar.gz" | shasum -a 256 --check
```

Extract the file:

shell

```shell
tar -xf "go${GO_VERSION}.linux-${GO_ARCH}.tar.gz"
```

You may need to change ownership on the new `go` directory:

shell

```shell
sudo chown -R root:root ./go
```

Finally, move the `go` directory to `/usr/local`:

shell

```shell
mv -v go /usr/local
```

On Ubuntu/Debian, you can download TinyGo similarly. Refer to the [TinyGo GitHub releases page](https://github.com/tinygo-org/tinygo/releases/) to find the correct version and architecture and set environment variables accordingly. (The values below are examples—**remember to always use the latest version of TinyGo**.)

shell

```shell
export TINYGO_VERSION="0.34.0"
```

shell

```shell
export TINYGO_ARCH="amd64"
```

Now download the `.deb` file:

shell

```shell
curl -O -L "https://github.com/tinygo-org/tinygo/releases/download/v${TINYGO_VERSION}/tinygo_${TINYGO_VERSION}_${TINYGO_ARCH}.deb"
```

Install TinyGo from the `.deb` file:

shell

```shell
sudo dpkg -i tinygo_${TINYGO_VERSION}_${TINYGO_ARCH}.deb
```

Add TinyGo to your PATH:

shell

```shell
export PATH=$PATH:/usr/local/bin
```

Validate the installation:

shell

```shell
tinygo version
```

**You will also need the `wasm-tools` utility.**

For the best experience, we strongly recommend using `wasm-tools` v1.225.0 and installing with [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html):

shell

```shell
cargo install --locked wasm-tools@1.225.0
```

Otherwise, [download the binary for `wasm-tools` v1.225.0 for your architecture](https://github.com/bytecodealliance/wasm-tools/releases/tag/v1.225.0) and add it to your PATH.

**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:

- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) v14.17+
- [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
```

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.

**Go**

In your terminal, run:

shell

```shell
wash new component hello --template-name hello-world-tinygo
```

After a moment, `wash` will create a new directory called `hello` with all of the required project files for building a component from your chosen language.

Navigate to the `hello` project directory:

sh

```sh
cd hello
```

**Rust**

In your terminal, run:

shell

```shell
wash new component hello --template-name hello-world-rust
```

After a moment, `wash` will create a new directory called `hello` with all of the required project files for building a component from your chosen language.

Navigate to the `hello` project directory:

sh

```sh
cd hello
```

**TypeScript**

In your terminal, run:

shell

```shell
wash new component hello --template-name hello-world-typescript
```

After a moment, `wash` will create a new directory called `hello` with all of the required project files for building a component from your chosen language.

Navigate to the `hello` project directory:

sh

```sh
cd hello
```

Install the npm packages for your project:

shell

```shell
npm install
```

## Start your developer loop

From our project directory, we'll run:

shell

```shell
wash dev
```

The `wash dev` command automatically **builds your WebAssembly component** and **deploys it to a local wasmCloud environment**. This will take a moment, and the terminal output will update you on the process. The last step should look like this:

text

```text
✅ Successfully started host, logs writing to /home/.wash/dev/kSKCGi/wasmcloud.log
🚧 Building project...
...
✨ HTTP Server: Access your application at http://127.0.0.1:8000
👀 Watching for file changes (press Ctrl+c to stop)...
```

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 <language>!
```

You just ran a WebAssembly application in wasmCloud!

## Make the application yours

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

**Go**

**Modify `main.go`**

The Go code for our component is found in `hello/main.go`.

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

go

```go
// Send HTTP response
func handleRequest(w http.ResponseWriter, r *http.Request) {
  fmt.Fprintf(w, "Hello from Go!\n")
  fmt.Fprintf(w, "Hello from Wasm!\n")
}
```

**Rust**

**Modify `lib.rs`**

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

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

rust

```rust
use wasmcloud_component::http;

struct Component;

http::export!(Component);

impl http::Server for Component {
    fn handle(
        _request: http::IncomingRequest,
    ) -> http::Result<http::Response<impl http::OutgoingBody>> {
        Ok(http::Response::new("Hello from Rust!\n"))
        Ok(http::Response::new("Hello from Wasm!\n"))
    }
}
```

**TypeScript**

**Modify `http-hello-world.ts`**

The TypeScript code for our component is found in `hello/http-hello-world.ts`.

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

typescript

```typescript
// Write hello world to the response stream
outputStream.blockingWriteAndFlush(
  new Uint8Array(new TextEncoder().encode('Hello from Typescript!\n'))
  new Uint8Array(new TextEncoder().encode('Hello from Wasm!\n'))
);
```

**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. The `wash dev` automatically builds and deploys the updated component.

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 with `wash dev`.

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**
