examples
examples copied to clipboard
Example actors, capability providers, and other demonstrations
wasmCloud Examples
Example actors, capability providers, and other demonstrations
Actors
The following actors run as WebAssembly on wasmCloud hosts.
Example | Description | OCI Reference (refer to example for latest version) |
---|---|---|
echo | An actor that listens on an HTTP port and returns a JSON payload describing the incoming request | wasmcloud.azurecr.io/echo |
echo-messaging | An actor that listens on a message broker topic and replies | wasmcloud.azurecr.io/echo-messaging |
hello | Canonical "hello world" actor that listens on an HTTP port and replies with a greeting | wasmcloud.azurecr.io/hello |
kvcounter | An actor that uses the key-value store to increment a counter and return a value for every HTTP request it receives | wasmcloud.azurecr.io/kvcounter |
logging | An actor that demonstrates the builtin logging capability provider | wasmcloud.azurecr.io/logging |
random | An actor that demonstrates the builtin random number generation capability provider | wasmcloud.azurecr.io/random |
todo-sql | An todo-application using sql database, https server (with TLS), logging, and numbergen | (unpublished) |
todo | An todo-application using keyvalue store, http server, and logging | (unpublished) |
xkcd | A application that generates xkcd comics | wasmcloud.azurecr/xkcd |
Interfaces
The following example interfaces are defined by Smithy models.
Example | Description | Capability contract | Rust crate |
---|---|---|---|
payments | A simple interface for a payments capability provider (used in the Creating an Interface tutorial) | wasmcloud:example:payments |
wasmcloud-examples-payments |
runner | A simple interface with a single 'Run' method | wasmcloud:example:runner |
wasmcloud-examples-runner |
Capability providers
Providers of capabilities for wasmCloud actors
Example | Description | Capability contract | OCI Reference |
---|---|---|---|
factorial | A capability provider that computes factorial of a number | wasmcloud:example:payments |
wasmcloud.azurecr.io/factorial |
fakepay | A simple payment provider, used in the Creating a capability provider tutorial | wasmcloud:example:fakepay |
wasmcloud.azurecr.io/fakepay |
Applications
Example | Description |
---|---|
petclinic | A WebAssembly and wasmCloud-based reimagining of the classic Spring Boot microservices Pet Clinic. The wasmCloud Pet Clinic consists of multiple actors, and uses a relational database capability provider and an http server capability provider. |
⚠️ Pre-OTP examples have moved ⚠️
Examples compatible with the 0.18 wasmcloud host have been moved to the pre-otp folder.