Crates.io | wascc-actor |
lib.rs | wascc-actor |
version | 0.7.4 |
source | src |
created_at | 2019-12-04 16:15:22.208853 |
updated_at | 2020-09-09 14:52:40.291754 |
description | SDK for developing WebAssembly Actor modules for hosting in waSCC |
homepage | https://wascc.dev |
repository | |
max_upload_size | |
id | 186430 |
size | 53,663 |
The waSCC Actor SDK is used by Rust developers building cloud-native workloads for the wasm32-unknown-unknown
target. Using waSCC to host your WebAssembly module frees you from the burden of manually implementing traditional non-functional requirements and boilerplate that typically bogs down development time. waSCC lets you focus solely on writing the business logic in a portable, secure wasm module that can run anywhere there's a waSCC host.
For more documentation, tutorials, and examples, please check out the wascc website.
extern crate wascc_actor as actor;
use actor::prelude::*;
actor_handlers!{ codec::http::OP_HANDLE_REQUEST => hello_world,
codec::core::OP_HEALTH_REQUEST => health }
fn hello_world(_req: codec::http::Request) -> ReceiveResult {
// Utilize capabilities here
// ...
Ok(vec![])
}
fn health(_req: codec::core::HealthRequest) -> ReceiveResult {
Ok(vec![])
}
If you want more functionality beyond the simple println
call, then you can
sign your modules with the wascc:logging
capability and you'll be able to use the idiomatic Rust log
macros like debug!
, warn!
, trace!
, etc.