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 install;
34pub mod keys;
35pub mod kind;
36pub mod layer;
37pub mod lineindex;
38pub mod linestatus;
39pub mod lockpin;
40pub mod manifest;
41pub mod pin;
42pub mod platform;
43pub mod realm;
44pub mod registry;
45pub mod resolve;
46pub mod reverify;
47pub mod rollback;
48pub mod sbom;
49pub mod sdkexport;
50pub mod selfverify;
51pub mod shadow;
52pub mod source;
53pub mod store;
54pub mod update;
55pub mod verify;
56pub mod vsixexport;
57
58pub use archive::{ArchiveError, ExportSummary, OciLayoutSource, export as export_archive};
59pub use deposit::{
60    DepositError, DepositFileSpec, DepositOutcome, DepositSpec, DepositTool, RunnerSpec,
61    ToolSource, deposit, parse_deposit_spec,
62};
63pub use install::{
64    InstallError, InstallOutcome, InstallPolicy, ManifestVerifier, VerifyError, install,
65};
66pub use kind::{ANN_KIND, PayloadKind, UnknownKind};
67pub use layer::{LayerId, LayerIdError, Line};
68pub use lineindex::{
69    IndexCache, IndexError, IndexPolicy, IndexedLayer, LineIndex,
70    attach_envelope_to_layout as attach_index_envelope_to_layout,
71    attach_to_layout as attach_index_to_layout, read_from_layout as read_index_from_layout,
72};
73pub use linestatus::{
74    KnownProblem, LayerStatusReport, LineStatus, LineStatusError, StatusCache,
75    attach_envelope_to_layout as attach_status_envelope_to_layout,
76    attach_to_layout as attach_status_to_layout,
77    cache_baseline_from_source as cache_baseline_line_status,
78    read_any_from_layout as read_any_status_from_layout,
79    read_from_layout as read_status_from_layout,
80};
81pub use manifest::{LayerManifest, ManifestError};
82pub use pin::{
83    Channel, DeclaredExportStatus, ExportDecl, ExportEnv, ExportKind, Pin, PinError,
84    ShadowDeclaration, ShimOrder, check_declared_export, classify_shadowing, env_lines,
85};
86pub use platform::host_platform;
87pub use realm::{Realm, RealmError, resolve_realm};
88pub use registry::{RegistryRef, RegistrySource};
89pub use resolve::{ResolveError, Resolved, RunnerContract, resolve};
90pub use reverify::{ReverifyError, verify_installed};
91pub use rollback::{HighWaterMarks, RollbackError, RollbackVerdict, staleness_warning};
92pub use sdkexport::{
93    ANN_SDK_PREFIX, Member, MemberBody, Relocation, SdkExportError, SdkExportReport,
94    check_destination_fits, export_sdk, relocate_bytes,
95};
96pub use selfverify::{
97    RELEASE_SUMS_PAYLOAD_TYPE, SelfVerifyError, sign_release_sums, verify_release_file,
98};
99pub use source::{DirSource, LayerRef, LayerSource, MemorySource, SourceError};
100pub use store::{InstalledLayer, Store, StoreError, manifest_digest};
101pub use verify::{
102    LAYER_PAYLOAD_TYPE, PinnedKeyVerifier, generate_root_keypair, sign_layer_manifest,
103};
104pub use vsixexport::{VsixEntry, VsixExportError, export_vsix};