#wapc #webassembly #wascc #actor

wascc-actor

SDK for developing WebAssembly Actor modules for hosting in waSCC

14 releases (6 breaking)

0.7.4 Sep 9, 2020
0.7.2 May 28, 2020
0.7.1 Apr 14, 2020
0.5.0 Mar 27, 2020
0.1.0 Dec 4, 2019

#928 in WebAssembly

Download history 32/week @ 2023-10-31 36/week @ 2023-11-07 38/week @ 2023-11-14 40/week @ 2023-11-21 68/week @ 2023-11-28 30/week @ 2023-12-05 45/week @ 2023-12-12 24/week @ 2023-12-19 51/week @ 2023-12-26 26/week @ 2024-01-02 27/week @ 2024-01-09 54/week @ 2024-01-16 12/week @ 2024-01-23 43/week @ 2024-01-30 22/week @ 2024-02-06 116/week @ 2024-02-13

204 downloads per month
Used in 3 crates

Apache-2.0

42KB
951 lines

crates.io  Rust  license  documentation

WebAssembly Secure Capabilities Connector - Actor SDK

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.

Example

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![])
}

Debug output vs. using the wascc:logging capability

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.

Dependencies

~1.2–2MB
~44K SLoC