Wascap Guest SDK

The Wascap Guest SDK is used by Rust developers building cloud-native workloads for the wasm32-unknown-unknown target. Using Waxosuit to host your WebAssembly module allows you to stop worrying about all of the non-functional requirements and boilerplate that typically bogs down all of our development time and focus squarely on compiling the business logic in a portable, secure Wasm module.

For more documentation, tutorials, examples, etc please check out the waxosuit website.

Example

``` extern crate wascap_guest as guest;

use guest::prelude::*;

callhandler!(handlecall);

pub fn handlecall(ctx: &CapabilitiesContext, cmd: &Command) -> Result { match cmd.payload { Some(ref p) => match p.typeurl.asref() { http::TYPEURLHTTPREQUEST => helloworld(ctx, p.value.asslice()), core::TYPEURLHEALTHREQUEST => Ok(Event::success()), _ => Ok(Event::baddispatch(&p.typeurl)), }, None => Ok(http::Response::badrequest().as_event(true, None)), } }

fn helloworld( ctx: &CapabilitiesContext, payload: impl Intohttp::Request) -> Result { Ok(http::Response::ok().asevent(true, None)) } ```