Skip to main content

pacr_types/
lib.rs

1//! # pacr-types
2//!
3//! Pillar: ALL. PACR field: ALL.
4//!
5//! The **trust root** of the entire Aevum codebase.
6//! Defines the PACR 6-tuple and all shared physical measurement types.
7//!
8//! ```text
9//! R = (ι,  Π,              Λ,            Ω,               Γ,               P)
10//!      id  predecessors    landauer_cost  resources         cognitive_split   payload
11//! ```
12//!
13//! | Field | Module     | Physical axiom                                    |
14//! |-------|------------|---------------------------------------------------|
15//! | ι     | record     | Logical a priori (referential necessity)           |
16//! | Π     | record     | Special relativity → causal partial order          |
17//! | Λ     | landauer   | Landauer's principle (Second Law)                 |
18//! | Ω     | ets        | Conservation laws + Margolus–Levitin              |
19//! | Γ     | complexity | Computational mechanics (arXiv:2601.03220)         |
20//! | P     | record     | Completeness axiom                                |
21//!
22//! ## Rules
23//! - Schema is **append-only**: existing field semantics NEVER change.
24//! - This crate has **zero dependencies** beyond serde, smallvec, bytes, thiserror.
25//! - `#![forbid(unsafe_code)]` is unconditional: no exceptions.
26
27#![forbid(unsafe_code)]
28#![deny(clippy::all, clippy::pedantic)]
29#![allow(
30    clippy::cast_precision_loss,
31    clippy::cast_possible_truncation,
32    clippy::cast_sign_loss,
33    clippy::similar_names,
34    clippy::doc_markdown,
35    clippy::must_use_candidate,
36    clippy::needless_pass_by_value,
37    clippy::missing_panics_doc,
38    clippy::missing_errors_doc,
39    clippy::return_self_not_must_use,
40    clippy::unreadable_literal
41)]
42
43pub mod complexity;
44pub mod estimate;
45pub mod ets;
46pub mod landauer;
47pub mod record;
48
49// ── Top-level re-exports (the public API of this crate) ──────────────────────
50
51pub use complexity::CognitiveSplit;
52pub use estimate::{Estimate, EstimateError};
53pub use ets::{PhysicsViolation, ResourceTriple};
54pub use landauer::{landauer_floor_joules, LandauerCost, H_BAR, K_B, LANDAUER_JOULES_300K};
55pub use record::{
56    BuildError, CausalId, PacrBuilder, PacrRecord, Payload, PredecessorSet, ValidationIssue,
57};