---
title: "Ferris Says | wasmCloud"
description: "This folder contains a simple WebAssembly component written in Rust, which responds with a version of cowsay tailored to Rustaceans (users of Rust)."
canonical: "https://wasmcloud.com/docs/v1/examples/rust/component/ferris-says/"
---

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

# Ferris Says

This folder contains a simple WebAssembly component written in [Rust](https://rust-lang.org), which responds with a version of [cowsay](https://en.wikipedia.org/wiki/Cowsay) tailored to Rustaceans (users of Rust).

## Prerequisites

- `cargo` 1.80
- [`wash`](https://wasmcloud.com/docs/v1/installation/) 0.29.0

## Building

bash

```bash
wash build
```

## Running with wasmCloud

Ensuring you've built your component with `wash build`, you can launch wasmCloud and deploy the full hello world application with the following commands. Once the application reports as **Deployed** in the application list, you can use `wash call` to call the exported function `invoke`.

shell

```shell
wash up -d
wash app deploy ./wadm.yaml
wash call ferris_says-ferris_says wasmcloud:example-ferris-says/invoke.say
```

You should see output that looks like the following:

```
 _______________________________
< Hello fellow wasmCloud users! >
 -------------------------------
        \
         \
            _~^~^~_
        \) /  o o  \ (/
          '_   -   _'
          / '-----' \
```

## Adding Capabilities

Want to go beyond this simple demo?

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.

## BONUS: Using the "system" clock in a WebAssembly context

When you use the `say()` export with this component, it uses the system clock, provided by the [Rust standard library (`SystemTime`)](https://doc.rust-lang.org/std/time/struct.SystemTime.html) and made available via [WASI clocks interface](https://github.com/WebAssembly/wasi-clocks).

Time, and computerized clocks are complicated, and "base" WebAssembly has *no concept* of a clock, which is where the WASI clocks interface steps in. That said, it's not that simple -- [`wasmtime`](https://wasmtime.dev) and other implementers of the WASI spec must *choose* what implementation of a clock to give you.

While somewhat unexpected, giving an accurate clock *can be unsafe*. Giving untrusted programs access to a very accurate clock on a system can make [timing attacks possible](https://en.wikipedia.org/wiki/Timing_attack) or make for [easier fingerprinting](https://github.com/bytecodealliance/wasmtime/issues/2125), so some may choose to insert some jitter into the clock that is made available to WebAssembly binaries at runtime.

wasmCloud chooses to expose the [`wasmtime` generated bindings for the system clock](https://docs.rs/wasmtime-wasi/latest/wasmtime_wasi/bindings/sync/clocks/wall_clock/trait.Host.html), which *may* change in the future, but it's important to keep in mind that these discrepancies are present, and answers you get from the SystemTime *may* be slightly inconsistent (in a bounded way) with "real time".

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