wasmCloud Host
wasmCloud is a secure, distributed actor platform with an autonomous mesh network built for bridging disparate and far-flung infrastructure.
By default a wasmCloud host will start in offline mode and only allow "local" scheduling of actors and capabilities. If you choose to opt-in to the lattice, you can use NATS as a message broker to provide the infrastructure for wasmCloud's self-forming, self-healing network. If you then want even more power, you can choose to override the capability provider used for managing the shared state within a lattice.
Local development on your workstation is easy and simple by default, and you should only incur additional complexity as you move toward resilient, distributed production environments.
To start a runtime, simply add actors and capabilities to the host. For more information, take a look at the documentation and tutorials at wasmcloud.dev.
Example
The following example creates a new wasmCloud host in the default standalone (no lattice) mode. It then loads an actor that simply echoes back incoming HTTP requests as outbound HTTP responses. The HTTP server capability provider is loaded so that the actor can receive web requests. Note that the link definition (configuration of the link between the actor and the capability provider) can be defined in any order. The host runtime automatically establishes links as soon as all related parties are up and running inside a host or a lattice.
use ;
use HashMap;
use Error;
use Duration;
use sleep;
use reqwest;
const WEB_PORT: u32 = 8080;
async
For more examples, refer to the integration tests located at the base of this repository