The waPC Guest SDK is used by Rust developers building workloads for the wasm32-unknown-unknown
target that will conform to the waPC (WebAssembly Procedure Calls) specification.
This crate is used by waxosuit as a foundation for its secure, dynamic binding of cloud capabilities on top of the waPC spec.
```rust extern crate wapc_guest as guest;
use guest::prelude::*;
wapchandler!(handlewapc);
pub fn handlewapc(operation: &str, msg: &[u8]) -> CallResult {
match operation {
"sample:Guest!Hello" => helloworld(msg),
_ => Err("bad dispatch".into()),
}
}
fn helloworld( _msg: &[u8]) -> CallResult { let _res = hostcall("sample:Host!Call", b"hello")?; Ok(vec![]) } ```