Skip to main content

Crate pmcp_workbook_runtime

Crate pmcp_workbook_runtime 

Source
Expand description

workbook-runtime — the RUNTIME-only leaf of the v0.5.0 compiler pipeline (Phase 11, Plan 05 — Codex HIGH #2: the runtime/compiler LINK boundary).

This crate holds the owned IR types (Expr/BinOp/UnOp/RangeRef/Cell/ CellExpr/CellValue), the dependency Dag container + toposort, the SERVE-time topo-ordered [run] executor, the manifest projection model, and a PURE-RUST scalar leaf evaluator (scalar_eval) that REPLACES the pmcp-code-mode (SWC/JS) kernel on the served-binary path.

It depends on NEITHER umya NOR SWC NOR pmcp-code-mode NOR quick-xml NOR zip — making the Ph10 D-01 boundary a cargo-tree-PROVABLE LINK boundary. The served binary (Plan 04) depends ONLY on this crate; workbook-compiler re-exports these types FROM here so its public surface (and Plan 03) keeps compiling unchanged.

Re-exports§

pub use excel_error::ExcelError;
pub use finding::LintFinding;
pub use finding::LintReport;
pub use finding::Severity;
pub use formula::BinOp;
pub use formula::Expr;
pub use formula::UnOp;
pub use range_ref::cell_key;
pub use range_ref::RangeRef;
pub use dag::toposort;
pub use dag::upstream_input_leaves;
pub use dag::Dag;
pub use resolve::a1_to_zero_indexed_row_col;
pub use resolve::expand_range;
pub use resolve::parse_a1;
pub use resolve::split_ref;
pub use resolve::RangeShape;
pub use resolve::ResolveError;
pub use resolve::MAX_RANGE_CELLS;
pub use manifest_model::is_computed;
pub use manifest_model::is_strict_constant;
pub use manifest_model::json_key_for_role;
pub use manifest_model::role_for_cell;
pub use manifest_model::sanitize_tool_name;
pub use manifest_model::AnnotationDecl;
pub use manifest_model::CapabilityDecl;
pub use manifest_model::CellRole;
pub use manifest_model::ChangelogEntry;
pub use manifest_model::Dtype;
pub use manifest_model::GovernedDatum;
pub use manifest_model::InputTier;
pub use manifest_model::LoopDecl;
pub use manifest_model::Manifest;
pub use manifest_model::Role;
pub use manifest_model::RESERVED_TOOL_NAMES;
pub use artifact_model::build_bundle_lock;
pub use artifact_model::fold_evidence_hash;
pub use artifact_model::sha256_hex;
pub use artifact_model::update_field;
pub use artifact_model::ArtifactHashes;
pub use artifact_model::BundleLock;
pub use artifact_model::CellEntry;
pub use artifact_model::CellMap;
pub use artifact_model::Tool;
pub use bundle_source::EmbeddedSource;
pub use bundle_source::BundleSource;
pub use bundle_source::BundleSourceError;
pub use bundle_source::LocalDirSource;
pub use bundle_loader::load as load_bundle;
pub use bundle_loader::BundleLoadError;
pub use bundle_loader::WorkbookBundle;
pub use render::CellLayout;
pub use render::LayoutDescriptor;
pub use render::SheetLayout;
pub use render::LAYOUT_DESCRIPTOR_VERSION;
pub use changelog::ChangeClass;
pub use changelog::OutputDelta;
pub use changelog::OutputMeta;
pub use changelog::VersionChangelog;
pub use scalar_eval::eval_scalar;
pub use sheet_ir::eval_bridge::env_key;
pub use sheet_ir::eval_bridge::from_json;
pub use sheet_ir::eval_bridge::percent;
pub use sheet_ir::eval_bridge::powf;
pub use sheet_ir::eval_bridge::preflight_error;
pub use sheet_ir::eval_bridge::to_json;
pub use sheet_ir::build_dag;
pub use sheet_ir::run as run_executor;
pub use sheet_ir::Cell;
pub use sheet_ir::CellEnv;
pub use sheet_ir::CellExpr;
pub use sheet_ir::CellValue;
pub use sheet_ir::EvalTrace;
pub use sheet_ir::EvalValue;
pub use sheet_ir::RunResult;

Modules§

artifact_model
The RUNTIME-safe bundle artifact model + hashing (CellMap/BundleLock + the integrity hash helpers shared by the emitter and the served integrity check). The RUNTIME-safe bundle artifact model + hashing (Phase 11, Plan 05 / Codex HIGH #2 boundary).
bundle_loader
The single shared, fail-closed bundle loader (load + WorkbookBundle + BundleLoadError) — the ONLY parse+integrity-verify path for any BundleSource (WBSV-08). The single shared, fail-closed [load] bundle verifier (Phase 92, Plan 01 — WBSV-08, threats T-92-01/02/04/22).
bundle_source
The dumb-byte BundleSource trait (local-dir + feature-gated embedded impls) — raw-byte access only, so no source can bypass the shared loader’s integrity gate (WBSV-08/WBSV-09). The dumb-byte BundleSource trait + its local-dir and embedded impls (Phase 92, Plan 01 — WBSV-09, WBSV-08 boundary).
changelog
The shared version-changelog model (Phase 13, Plan 01): the owned serde + JsonSchema records (ChangeClass/Severity/OutputMeta/OutputDelta/ VersionChangelog) the offline promote gate RECORDS and the served diff_version tool SERVES. Defined HERE (not in workbook-compiler) because the served binary deserializes it — the crate-purity invariant. The shared version-changelog data model (Phase 13, Plan 01 — D-13/D-15).
dag
The pure owned dependency Dag container + Kahn’s toposort. The PURE owned per-cell dependency-graph container Dag (CMP-02, D-06) + Kahn’s toposort over it.
excel_error
The shared Excel error-value set. The shared Excel error-value set — a SMALL value-semantics module owned by neither the parser AST nor the cell-value boundary, so BOTH can reference it WITHOUT a module cycle (review finding #9).
finding
The located, collect-all lint-finding types (LintFinding/Severity/LintReport). The located, collect-all lint-finding types (DIA-02 finding shape).
formula
The owned formula AST (Expr/BinOp/UnOp). The owned, serde/schemars-clean formula AST (CMP-01) the hand-rolled parser (workbook-compiler) builds and the DAG/sheet_ir executor consume.
manifest_model
The logical manifest projection model (Manifest/CellRole/Role/InputTier/…). The logical Manifest model — the source of truth that REPLACES “colour as canonical” (DIA-03). RELOCATED into workbook-runtime (Phase 11, Plan 05) so the served binary can deserialize the manifest projection WITHOUT linking the offline compiler. workbook-compiler re-exports these types (its manifest::model surface is unchanged) and keeps manifest SYNTHESIS / ratification / projections on its umya-linked side.
range_ref
The owned A1 range reference + the canonical cell_key helper. The owned, structured A1 range reference RangeRef + the canonical cell-key helper cell_key — RELOCATED into workbook-runtime (Phase 11, Plan 05).
render
The serve-side render layer (Phase 12): the shared, versioned LayoutDescriptor serde shape (Plan 01) the offline emitter and the writer-only serve path (Plan 02) both use. The serve-side, WRITER-ONLY render module (Phase 12).
resolve
Range/reference resolution PRIMITIVES (expand_range/parse_a1/split_ref). Range/reference resolution PRIMITIVES (CMP-02, D-06/D-07) — the umya-free, SAFE FALLIBLE subset RELOCATED into workbook-runtime (Phase 11, Plan 05).
scalar_eval
The PURE-RUST scalar leaf evaluator that replaces the pmcp-code-mode kernel. The PURE-RUST scalar leaf evaluator (Phase 11, Plan 05 — Codex HIGH #2).
sheet_ir
The sheet_ir value/eval layer + the SERVE-time executor. sheet_ir skeleton + the Excel-semantics layer (CMP-03).