Skip to main content

phoxal_bundle/
lib.rs

1//! The persisted runtime bundle boundary.
2//!
3//! `phoxal-manifest` compiles authored YAML/URDF into canonical model facts;
4//! this crate owns the artifact that remains after that source tree is gone.
5//! A runtime process reads only `runtime.json`, the indexed files below
6//! `assets/`, and the selected binary below `bin/`. It never invokes the source
7//! compiler and never discovers a participant from a catalog.
8//!
9//! ```text
10//! <bundle>/
11//! ├── runtime.json
12//! ├── assets/
13//! └── bin/
14//! ```
15
16pub use phoxal_runtime_contract::identity::ParticipantArtifactId;
17
18mod path;
19pub use path::{BundlePath, BundlePathError, DigestError, Sha256Digest};
20mod asset;
21pub use asset::{AssetIndex, AssetRecord, ParticipantAssets};
22mod reader;
23pub use reader::{ParticipantBundle, ParticipantRuntimeInputs, RuntimeBundle};
24mod error;
25pub use error::{BundleError, DocumentError, SelectionError};
26mod writer;
27pub use writer::BundleWriter;
28mod fs;
29pub(crate) use fs::{
30    BundleRoot, copy_executable_source, create_staging_root, ensure_staging_directory,
31    mark_staging_root_ready, open_bundle_file, open_executable_source, prepare_publish_parent,
32    publish_staging_root, read_and_verify, read_runtime_document, reject_existing_target,
33    require_layout_directories, validate_layout, write_new_file,
34};
35mod artifact;
36pub use artifact::{BinaryReference, BinarySource};
37mod participant;
38pub use participant::RuntimeParticipant;
39mod document;
40pub use document::{ParticipantClock, Runtime, RuntimeDocument, RuntimeRouterConfig};
41
42/// The only schema tag currently readable by this framework train.
43pub const RUNTIME_SCHEMA: &str = "phoxal/runtime-bundle/v0";
44/// The persisted document filename at the bundle root.
45pub const RUNTIME_FILE: &str = "runtime.json";
46/// The participant-readable asset directory.
47pub const ASSETS_DIR: &str = "assets";
48/// The supervisor-only binary directory.
49pub const BIN_DIR: &str = "bin";
50#[cfg(test)]
51mod bundle_boundary_tests;