pub enum PackingStrategy {
OnePerPackage,
PopularityBased {
max_layers: usize,
},
CatalogAware {
max_layers: usize,
},
}Expand description
Strategy for grouping packages into OCI layers.
Layer order: most-stable (lowest in dependency graph) at index 0, most-volatile (entrypoint) at the top. Docker pulls layers in manifest order so stable-first minimises re-downloads across tool upgrades.
Variants§
OnePerPackage
Each package gets its own layer (default for small tool sets).
PopularityBased
Popularity-based packing when max_layers is exceeded.
Requires a pre-computed PopularityMap from bv-builder pack. The
most popular packages (by co-occurrence across all registry specs) get
solo layers; the long tail is bundled into one layer.
CatalogAware
Catalog-aware greedy packing.
Packages that already have an entry in the LayerCatalog (meaning a
matching blob is already on the registry from a previous build) are
sorted by their catalog count descending and given priority for solo
layers. Cache-miss packages fill the remaining solo slots; any overflow
goes into a single long-tail layer.
This is the preferred strategy for bv publish --spec because it
requires no pre-computation: the catalog grows incrementally and each
new publish greedily populates it.
Trait Implementations§
Source§impl Clone for PackingStrategy
impl Clone for PackingStrategy
Source§fn clone(&self) -> PackingStrategy
fn clone(&self) -> PackingStrategy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PackingStrategy
impl Debug for PackingStrategy
Source§impl Default for PackingStrategy
impl Default for PackingStrategy
Source§fn default() -> PackingStrategy
fn default() -> PackingStrategy
impl Eq for PackingStrategy
Source§impl PartialEq for PackingStrategy
impl PartialEq for PackingStrategy
Source§fn eq(&self, other: &PackingStrategy) -> bool
fn eq(&self, other: &PackingStrategy) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PackingStrategy
Auto Trait Implementations§
impl Freeze for PackingStrategy
impl RefUnwindSafe for PackingStrategy
impl Send for PackingStrategy
impl Sync for PackingStrategy
impl Unpin for PackingStrategy
impl UnsafeUnpin for PackingStrategy
impl UnwindSafe for PackingStrategy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.