---
title: "wash FAQ — Wasm Shell CLI Questions | wasmCloud"
description: "Frequently asked questions about wash, the Wasm Shell CLI — installation, builds, publishing, and the wasmCloud WebAssembly development workflow."
canonical: "https://wasmcloud.com/docs/wash/faq/"
---

Version: v2

# Wasm Shell Frequently Asked Questions (FAQ)

## General Questions

**How can I run components built with Wasm Shell?**

You can use `wash` to create and publish WebAssembly components for any runtime or runtime environment that supports the [WebAssembly Component Model](https://component-model.bytecodealliance.org/), including wasmCloud, Spin, jco, wasmtime, and others.

## Differences from `wash` 1.x and below

**What are the differences between **Wasm Shell** (`wash` v2.x and higher) and **wasmCloud Shell** (`wash` v1.x and below)?**

**wasmCloud Shell**, the previous iteration of `wash`, was designed as a utility for building WebAssembly components *and* managing deployments for wasmCloud 1.x and below.

**Wasm Shell** (`wash` v2.x and higher) is a more tightly focused utility for WebAssembly component development, designed to be usable across the Wasm ecosystem.

This means that many commands and features that were available in `wash` v0.x are not included in Wasm Shell.

The table below outlines major differences in versions:

| FEATURE | Wasm Shell (v2.x and higher) | wasmCloud Shell (v1.x and below) | Notes |
| --- | --- | --- | --- |
| Create a Wasm component project | Yes, with `wash new <GIT-REPO>` | Yes, with `wash new component` |  |
| Start a development server | Yes, with `wash dev` | Yes, with `wash dev` |  |
| Build a Wasm binary | Yes, with `wash build` | Yes, with `wash build` |  |
| Push a component to registry as an OCI artifact | Yes, with `wash oci push` | Yes, with `wash push` | Wasm Shell uses the `oras` library—learn more in the Registries docs |
| Pull a component OCI artifact from a registry | Yes, with `wash oci pull` | Yes, with `wash pull` | Wasm Shell uses the `oras` library—learn more in the Registries docs |
| Self-update `wash` | Yes, with `wash update` | No |  |
| Inspect a component's WIT | Yes, with `wash inspect` | Yes, with `wash inspect` |  |
| Create a wasmCloud capability provider | No | Yes, with `wash new provider` | The capability provider model is being overhauled—learn more in the Roadmap |
| Run a wasmCloud host | Yes, with `wash host` | Yes, with `wash up` |  |
| Manage wasmCloud deployments | No | Yes, with commands such as `wash app deploy` | In wasmCloud v2, deployments are managed via the Workload API using Kubernetes or another orchestration system of your choice |
| Washboard UI | No | Yes, with `wash ui` |  |

## Troubleshooting

### Building with TinyGo

**How do I set up a TinyGo project for `wash build`?**

TinyGo projects use a `Makefile` to wrap the build steps and a `.wash/config.yaml` file to tell `wash` which commands to run.

Your `.wash/config.yaml` should specify the build command:

yaml

```yaml
dev:
  command: make build

build:
  command: make bindgen build
```

Your `Makefile` invokes TinyGo directly with the `-wit-package` and `-wit-world` flags:

makefile

```makefile
.PHONY: build
build:
	tinygo build -target wasip2 -wit-package ./wit -wit-world hello -o my-component.wasm ./

.PHONY: bindgen
bindgen:
	go generate ./...
```

For full instructions, see the [Go Language Guide](https://wasmcloud.com/docs/wash/developer-guide/language-support/go/).

#### Common issues with TinyGo builds

There are a number of common issues with TinyGo builds that can be difficult to interpret based on error messages:

##### Imports Not Generated Properly

shell

```shell
error: failed to encode a component from module
Caused by:
    0: failed to decode world from module
    1: module was not valid
    2: failed to resolve import `wasi:http/outgoing-handler@0.2.0::handle`
    3: module requires an import interface named `wasi:http/outgoing-handler@0.2.0`
`wasm-tools component new` failed: exit status 1
```

**What happened:** You don't have your imports generated properly.

**What to do:** Re-generate imports, attempt to build again, and debug imports if unsuccessful.

##### WIT Files Not Available

shell

```shell
error: failed to read path for WIT [./wit]
Caused by:
    0: No such file or directory (os error 2)
`wasm-tools component embed` failed: exit status 1
```

**What happened:** Your WIT files aren't available at the specified path.

**What to do:** Ensure that your WIT files are available at the specified path.

##### Importing Unsupported Interface

shell

```shell
failed to pre-instantiate component
Caused by:
    0: component imports instance `wasi:http/types@0.2.0`, but a matching implementation was not found in the linker
    1: instance export `fields` has the wrong type
    2: resource implementation is missing
```

**What happened:** You are importing an interface that `wash` doesn't know about.

**What to do:** If you believe `wash` should support the interface, [file an issue on GitHub](https://github.com/wasmCloud/wasmCloud/issues/new).

##### Missing WIT Interface Definition

shell

```shell
ERROR tinygo build failed stderr=error: failed to encode a component from module
Caused by:
    0: failed to decode world from module
    1: module was not valid
    2: failed to resolve import `wasi:logging/logging@0.1.0-draft::log`
    3: module requires an import interface named `wasi:logging/logging@0.1.0-draft`
`wasm-tools component new` failed: exit status 1
TinyGo build failed: error: failed to encode a component from module
Caused by:
    0: failed to decode world from module
    1: module was not valid
    2: failed to resolve import `wasi:logging/logging@0.1.0-draft::log`
    3: module requires an import interface named `wasi:logging/logging@0.1.0-draft`
`wasm-tools component new` failed: exit status 1
```

**What happened:** `wash` could not find the WIT definition.

**What to do:** Verify that your WIT definition is available at the expected path.

##### World Not Found - Defaults to CLI

shell

```shell
➜ wash inspect ./build/output.wasm
package root:component;
world root {
  import wasi:cli/environment@0.2.0;
  import wasi:io/error@0.2.0;
  import wasi:io/streams@0.2.0;
  import wasi:cli/stdin@0.2.0;
  import wasi:cli/stdout@0.2.0;
  import wasi:cli/stderr@0.2.0;
  import wasi:clocks/monotonic-clock@0.2.0;
  import wasi:clocks/wall-clock@0.2.0;
  import wasi:filesystem/types@0.2.0;
  import wasi:filesystem/preopens@0.2.0;
  import wasi:random/random@0.2.0;
  export wasi:cli/run@0.2.0;
}
```

**What happened:** If TinyGo can't find the specified world for some reason, it assumes that you are targeting `wasi:cli/run` instead of your intended target world.

**What to do:** Verify that you have correctly specified your target world in the configuration file and that your WIT definition is in the expected path.

Last updated on **Nov 21, 2026** by **Liam Randall**
