scrollcase_consumer/lib.rs
1//! Verify, prepare, and run caller-supplied local Scrollcase boxes.
2//!
3//! A **box** is a portable, locked, self-contained Python environment built for one operating system
4//! and accelerator, signed so whoever receives it can prove what they received. This crate is the
5//! consuming half of that story, and only that half: it verifies a signed release a caller already
6//! holds, extracts or re-identifies the box on local disk, and runs the entry point the release
7//! declares.
8//!
9//! It is deliberately **not** a distribution system. It selects no channel, downloads nothing,
10//! updates nothing, and knows about no registry. Every path, trust key, archive and destination comes
11//! from the caller, because those lifecycle choices belong to the application, not to the format.
12//!
13//! # Verification precedes execution
14//!
15//! No interpreter, script, module or import from a box runs before the signature, the payload shape,
16//! the archive size and hash, the entry safety and the manifest agreement have all passed. The type
17//! system carries that rule: the receipt proving those checks succeeded has private fields and no
18//! public constructor, so it can only be obtained from a function that performed them.
19//!
20//! # Relationship to the other implementations
21//!
22//! The Node consumer at `scrollcase/consumer` and the Python `scrollcase_consumer` package implement
23//! the same semantics. All three prove themselves against shared language-neutral fixtures rather
24//! than maintaining separate definitions of the format.
25
26#![doc(html_root_url = "https://docs.rs/scrollcase-consumer")]
27
28pub mod archive;
29pub mod contract;
30pub mod environment;
31pub mod error;
32pub mod execution;
33pub mod filesystem;
34pub mod path;
35pub mod prepare;
36pub mod release;
37pub mod run;
38pub mod trust;
39pub mod verify;
40
41pub use error::{Error, Result};