Expand description
Rust bindings for ExecSandbox’s WASM guest ABI
(send/recv/conn_write/max_frame), for guest modules built for
the wasm32-wasip1 target.
It hides pointer/length plumbing and buffer sizing behind a small
Rust-native API: send, recv and conn_write work with
&[u8]/Vec<u8>, Kind identifies what recv returned, and
timeouts are an Option<Duration>.
This crate must be built for wasm32-wasip1 — the ABI it wraps only
exists on that target. It has no dependency on the ExecSandbox host’s
own code; the ABI it binds to is defined by the host project at
https://github.com/amisonnet8/execsandbox
(docs/spec/execsandbox_spec_ja.md, section 5), which this crate
treats as the sole source of truth.
Structs§
- Message
- One item taken off this sandbox’s mailbox by
recv. - Unknown
Connection - Error returned by
conn_writewhenconn_iddoes not name a currently open connection (spec section 5.4).
Enums§
Functions§
- conn_
write - Writes
datato the external connection identified byconn_id. ReturnsUnknownConnectionifconn_iddoes not name a currently open connection (spec section 5.4). - max_
frame - Reports the maximum frame size, in bytes, that this ExecSandbox
instance was configured with (the host’s
--max-frameflag). - recv
- Takes one message off this sandbox’s mailbox.
- send
- Sends
datato the destination numbereddest, as wired up for this sandbox instance at launch time (the host’s-dflag).