Skip to main content

varve_core/
lib.rs

1//! Layer manifests, resolution, the core store, and verification wiring.
2//!
3//! `varve` reads two manifests and must never conflate them:
4//!
5//! * **the pin** (`varve.toml`) — human-written, checked into a consuming repo,
6//!   naming the layer that project is frozen on;
7//! * **the layer manifest** — CI-written, signed, immutable, describing exactly
8//!   what a layer contains.
9//!
10//! The pin is a preference; the layer manifest is evidence.
11//!
12//! # The invariant
13//!
14//! Where bytes come from is pluggable — a public registry, a private one, an
15//! archived core. **Whether they are accepted is not.** Signature and digest
16//! verification run against the PulseEngine trust root on every path, and
17//! swapping the source must not change any verdict. A source that could
18//! influence acceptance would have joined the trusted base.
19//!
20//! See `docs/manifest-format.md`. Nothing here is implemented yet.
21
22#![forbid(unsafe_code)]
23
24pub mod archive;
25pub mod attest;
26pub mod attestcarry;
27pub mod bazel;
28pub mod compose;
29pub mod crateexport;
30pub mod deposit;
31pub mod discover;
32pub mod exportstamp;
33pub mod ingest;
34pub mod install;
35pub mod keys;
36pub mod kind;
37pub mod layer;
38pub mod layerspec;
39pub mod lineindex;
40pub mod linestatus;
41pub mod lockpin;
42pub mod manifest;
43pub mod pin;
44pub mod platform;
45pub mod realm;
46pub mod referrers;
47pub mod registry;
48pub mod resolve;
49pub mod reverify;
50pub mod rollback;
51pub mod sbom;
52pub mod sdkexport;
53pub mod selfverify;
54pub mod shadow;
55pub mod source;
56pub mod store;
57pub mod update;
58pub mod verify;
59pub mod vsixexport;
60
61pub use archive::{
62    ArchiveError, ArchiveOptions, ExportSummary, OciLayoutSource, export as export_archive,
63    export_with_options as export_archive_with_options,
64};
65pub use deposit::{
66    DepositError, DepositFileSpec, DepositOptions, DepositOutcome, DepositSpec, DepositTool,
67    RunnerSpec, ToolSource, deposit, deposit_with_options, parse_deposit_spec,
68};
69pub use ingest::{ANN_PROOF, ANN_PROOF_ASSERTS, ANN_PROOF_SIGNER, IngestProof, UnknownProof};
70pub use install::{
71    InstallError, InstallOutcome, InstallPolicy, ManifestVerifier, VerifyError, install,
72};
73pub use kind::{ANN_KIND, PayloadKind, UnknownKind};
74pub use layer::{LayerId, LayerIdError, Line};
75pub use lineindex::{
76    IndexCache, IndexError, IndexPolicy, IndexedLayer, LineIndex,
77    attach_envelope_to_layout as attach_index_envelope_to_layout,
78    attach_to_layout as attach_index_to_layout, read_from_layout as read_index_from_layout,
79};
80pub use linestatus::{
81    KnownLayers, KnownProblem, LayerStatusReport, LineStatus, LineStatusError, RefCheck,
82    StatusCache, attach_envelope_to_layout as attach_status_envelope_to_layout,
83    attach_envelope_to_layout_checked as attach_status_envelope_to_layout_checked,
84    attach_to_layout as attach_status_to_layout,
85    cache_baseline_from_source as cache_baseline_line_status, known_layers_from_index,
86    known_layers_in_layout, known_layers_in_layout_dirs,
87    read_any_from_layout as read_any_status_from_layout,
88    read_from_layout as read_status_from_layout,
89};
90pub use manifest::{LayerManifest, ManifestError};
91pub use pin::{
92    Channel, DeclaredExportStatus, ExportDecl, ExportEnv, ExportKind, Pin, PinError,
93    ShadowDeclaration, ShimOrder, check_declared_export, classify_shadowing, env_lines,
94};
95pub use platform::host_platform;
96pub use realm::{Realm, RealmError, resolve_realm};
97pub use referrers::{
98    CarriedWork, WouldDestroy, guard as guard_layout, scan as scan_layout_referrers,
99};
100pub use registry::{RegistryRef, RegistrySource};
101pub use resolve::{ResolveError, Resolved, RunnerContract, resolve};
102pub use reverify::{ReverifyError, verify_installed};
103pub use rollback::{HighWaterMarks, RollbackError, RollbackVerdict, staleness_warning};
104pub use sdkexport::{
105    ANN_SDK_PREFIX, Member, MemberBody, Relocation, SdkExportError, SdkExportReport,
106    check_destination_fits, export_sdk, relocate_bytes,
107};
108pub use selfverify::{
109    RELEASE_SUMS_PAYLOAD_TYPE, SelfVerifyError, sign_release_sums, verify_release_file,
110};
111pub use source::{DirSource, LayerRef, LayerSource, MemorySource, SourceError};
112pub use store::{InstalledLayer, Store, StoreError, manifest_digest};
113pub use verify::{
114    LAYER_PAYLOAD_TYPE, PinnedKeyVerifier, generate_root_keypair, sign_layer_manifest,
115};
116pub use vsixexport::{VsixEntry, VsixExportError, export_vsix};