---
title: "📡 WADM Status Receiver Example | wasmCloud"
description: "This folder contains a WebAssembly component that makes use of:"
canonical: "https://wasmcloud.com/docs/v1/examples/rust/component/wadm-status-receiver/"
---

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

# 📡 WADM Status Receiver Example

This folder contains a WebAssembly component that makes use of:

- The [`wasmcloud:wadm/handler` WIT contract](https://github.com/wasmCloud/wasmCloud/blob/main/examples/rust/components/wadm-status-receiver/wit/deps/wasmcloud-wadm-0.2.0/package.wit)
- The [`wadm-provider`](https://github.com/wasmCloud/wasmCloud/tree/main/crates/provider-wadm) Capability Provider

## 📦 Dependencies

- [`cargo`](https://doc.rust-lang.org/cargo/) (part of the Rust toolchain) for building this project
- [`wash`](https://github.com/wasmCloud/wash) for building and running the components and [wasmCloud](https://wasmcloud.com/docs/v1/intro/) hosts

## 👟 Quickstart

As with all other examples, you can get started quickly by using the [Wasmcloud SHell (`wash`)](https://github.com/wasmCloud/wash).

Since `wash` supports declarative deployments (powered by \[Wasmcloud Application Deployment Manager (`wadm`)\]\[wadm\]), you can get started quickly using the provided manifests:

### Build this component

console

```console
wash build
```

This will create a folder called `build` which contains `wadm_status_receiver_s.wasm`.

> \[!NOTE\] If you're using a local build of the provider (using `file://...` in `wadm.yaml`) this is a good time to ensure you've built the \[provider archive `par.gz`\]\[par\] for your provider.

### Start a wasmCloud host with WADM

console

```console
wash up
```

### Deploy the status receiver application

First, deploy our status receiver component that will listen for updates:

console

```console
wash app deploy local.wadm.yaml
```

### Deploy the example application to monitor

Now deploy the example application that our receiver will monitor:

console

```console
wash app deploy example.wadm.yaml
```

You should start seeing status updates in the logs as the example application deploys and its status changes.

To see everything running in the lattice:

console

```console
wash get inventory
```

To test status changes, you can:

1. Undeploy the example application:

   console

   ```console
   wash app undeploy rust-hello-world
   ```
2. Redeploy it:

   console

   ```console
   wash app deploy rust-hello-world
   ```

Each of these actions will generate status updates that our receiver will log.

## ⌨️ Code guide

rust

```rust
impl Guest for StatusReceiver {
    fn handle_status_update(msg: StatusUpdate) -> Result<(), String> {
        wasi::logging::logging::log(
            wasi::logging::logging::Level::Info,
            "wadm-status",
            &format!(
                "Application '{}' v{} - Status: {:?}",
                msg.app, msg.status.version, msg.status.info.status_type
            ),
        );

        wasi::logging::logging::log(
            wasi::logging::logging::Level::Info,
            "wadm-status",
            &format!("Components found: {}", msg.status.components.len()),
        );

        for component in msg.status.components {
            wasi::logging::logging::log(
                wasi::logging::logging::Level::Info,
                "wadm-status",
                &format!(
                    "Component '{}' - Status: {:?}",
                    component.name, component.info.status_type
                ),
            );
        }
        Ok(())
    }
}
```

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