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