execsandbox 0.1.1

Rust bindings for ExecSandbox's WASM guest ABI (send/recv/conn_write/max_frame), for guest modules built for wasm32-wasip1.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! A minimal ExecSandbox guest: blocks until one sandbox-to-sandbox
//! message arrives, prints it, and exits. Run it with a host launched as
//! `execsandbox -n <this-name> -s out ...` so it has an identity to
//! receive on and its stdout is visible.

fn main() {
    match execsandbox::recv(None) {
        Some(msg) => println!(
            "kind={} data={}",
            msg.kind as u32,
            String::from_utf8_lossy(&msg.data)
        ),
        None => println!("timed out waiting for a message"),
    }
}