---
title: "Rust HTTP Password Checker | wasmCloud"
description: "This repository contains a WebAssembly Component written in Rust, which:"
canonical: "https://wasmcloud.com/docs/v1/examples/rust/component/http-password-checker/"
---

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

# Rust HTTP Password Checker

This repository contains a WebAssembly Component written in [Rust](https://rust-lang.org), which:

- Implements a [`wasi:http`](https://github.com/WebAssembly/wasi-http)-compliant HTTP handler
- Uses the [`httpserver` provider](https://github.com/wasmCloud/wasmCloud/tree/main/crates/providers/http-server) to serve requests
- Provides APIs for checking a password from a secret store, or from the incoming request
- Can be declaratively provisioned with [`wadm`](https://github.com/wasmCloud/wadm)

# Dependencies

This relies on the following installed software:

| Name | Description |
| --- | --- |
| `cargo` | [Rust package installer](https://doc.rust-lang.org/cargo) (part of the Rust toolchain) |
| `wash` | [Wasmcloud Shell](https://github.com/wasmCloud/wasmCloud/tree/main/crates/wash) controls your [wasmcloud](https://wasmcloud.com/docs/v1/intro/) host instances and enables building components |

# Quickstart

To get started developing this repository quickly, clone the repo and run `wash dev`:

console

```console
wash dev
```

`wash dev` does many things for you:

- Starts the [wasmCloud host](https://wasmcloud.com/docs/v1/concepts/hosts/) that can run your WebAssembly component
- Builds this project
- Builds a declarative WADM manifest consisting of:
  - Your locally built component
  - A [HTTP server provider](https://github.com/wasmCloud/wasmCloud/tree/main/crates/providers/http-server) which will receive requests from the outside world (on port 8000 by default)
  - Necessary links between providers and your component so your component can handle web traffic
- Deploys the built manifest (i.e all dependencies to run this application) locally
- Watches your code for changes and re-deploys when necessary.

## Send a request to the running component

Once `wash dev` is serving your component, to send a request to the running component (via the HTTP server provider):

console

```console
curl localhost:8000/api/v1/check --data '{"value": "test"}'
```

You should see a JSON response like:

json

```json
{
  "status": "success",
  "data": {
    "strength": "very-weak",
    "length": 4,
    "contains": [
      "lowercase"
    ]
}
```

## Adding Capabilities

To learn how to extend this example with additional capabilities, see the [Adding Capabilities](https://wasmcloud.com/docs/v1/tour/add-features/?lang=rust) section of the wasmCloud documentation.

# Issues/ FAQ

**`curl` produces a "failed to invoke" error If `curl`ing produces ``` ➜ curl localhost:8000 failed to invoke `wrpc:http/incoming-handler.handle`: failed to invoke `wrpc:http/incoming-handler@0.1.0.handle`: failed to shutdown synchronous parameter channel: not connected% ``` You *may* need to just wait a little bit -- the HTTP server takes a second or two to start up. If the issue *persists*, you *may* have a lingering HTTP server provider running on your system. You can use `pgrep` to find it: console ```console ❯ pgrep -la ghcr_io 4007604 /tmp/wasmcloudcache/NBCBQOZPJXTJEZDV2VNY32KGEMTLFVP2XJRZJ5FWEJJOXESJXXR2RO46/ghcr_io_wasmcloud_http_server_0_23_1 ```**

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