Skip to main content

Module bundle_source

Module bundle_source 

Source
Expand description

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).

A BundleSource exposes ONLY raw-byte access to a bundle’s members: BundleSource::read_artifact (one member’s exact bytes) and BundleSource::list_artifacts (the sorted member set). It deliberately CANNOT return a parsed bundle — no source impl can pre-parse and thereby skip the integrity gate. The single shared crate::bundle_loader::load is the ONLY parse+verify path (WBSV-08, the type-level bypass impossibility, threat T-92-03).

Two impls ship:

  • LocalDirSource — reads a bundle from a directory tree on disk. One source = one bundle@version (D-08); the constructor takes the bundle root.
  • EmbeddedSource (behind the embedded feature) — reads the SAME bundle baked into the binary via an include_dir::Dir (WBSV-09). The two return identical bytes for the same member, so the loader verifies them identically.

The trait is SYNC (no async_trait, D-07): a byte accessor has no I/O concurrency need on the boot path, and a sync trait stays object-safe + Send + Sync without an executor.

Structs§

EmbeddedSource
A BundleSource that reads a bundle baked into the binary via include_dir::Dir (WBSV-09), gated behind the embedded feature.
LocalDirSource
A BundleSource that reads a bundle from a directory tree on disk.

Enums§

BundleSourceError
Errors a BundleSource may surface.

Traits§

BundleSource
Raw-byte access to a single bundle’s members.