Skip to main content

spawn_parent_m/
lib.rs

1//! Sub-VM parent guest. Set up by the test harness with:
2//!
3//! - slot 3: `Hash(image_s)` — content-addressed `Cap::Image` for S.
4//! - slot 5: `Hash(input_data)` — input `Cap::Data` for the call.
5//!
6//! M mints a fresh prepared CNode, copies the input DataCap into
7//! its own `slot[0]` (the CALL scratchpad), derives a child Instance
8//! from Image S + the prepared CNode, and CALLs the child. When the
9//! child halts, the kernel reflects the child's `slot[0]` (a fresh
10//! result DataCap) back into M's `slot[0]`. M reads that DataCap and
11//! returns the resulting byte.
12
13#![cfg_attr(target_os = "none", no_std)]
14
15use subsoil as _;