wasmCloud Extras Actor Interface

This crate provides wasmCloud actors with an interface to the extras capability provider. Every wasmCloud host runtime automatically comes with a built-in extras provider. However, actors using this provider will still need to be signed with the wasmcloud:extras capability contract ID.

The following functions are supported on the extras Host interface:

Example:

```rust extern crate wapcguest as guest; use guest::prelude::*; use wasmcloudactorcore as core; use wasmcloudactorextras as extras; use wasmcloudactorhttpserver as http; use serde_json::json; use log::{error, info};

[no_mangle]

pub fn wapcinit() { http::Handlers::registerhandlerequest(generateguid); core::Handlers::registerhealthrequest(health); }

/// Generate a Guid and return it in a JSON envelope fn generateguid(req: http::Request) -> HandlerResulthttp::Response { let guid = getguid()? // Replace this with extras::default().request_guid()? .unwrapor("unknown-guid".to_string());

let result = json!({"guid": guid }); Ok(http::Response::json(&result, 200, "OK"))

}

fn health(_: core::HealthCheckRequest) -> HandlerResult { Ok(core::HealthCheckResponse::healthy())
} ```