pub enum Ecosystem {
Uv,
Npm,
Cargo,
}Expand description
An ecosystem whose dependency files may enter the build artifact (#74).
The variant fixes both entry names. That is the TRAP-5 half of the design: the
artifact is a shared image snapshot, so what may enter it is an allowlist of
dependency-defining files, not a caller-named list — there is no field anywhere in this
module a caller could put .env or a credentials file’s name into. The byte-scan test
at the bottom of this file covers the entries this type admits.
Variants§
Uv
Python under uv: pyproject.toml + uv.lock.
Npm
Node under npm: package.json + package-lock.json.
Cargo
Rust under cargo: Cargo.toml + Cargo.lock.
Implementations§
Source§impl Ecosystem
impl Ecosystem
Sourcepub fn manifest_name(self) -> &'static str
pub fn manifest_name(self) -> &'static str
The manifest’s file name, which is also its zip entry name.
Sourcepub fn lockfile_name(self) -> &'static str
pub fn lockfile_name(self) -> &'static str
The lockfile’s file name, which is also its zip entry name — and the file the environment layer is keyed on (#74).
Sourcepub fn install_run_line(self) -> &'static str
pub fn install_run_line(self) -> &'static str
The whole RUN line that installs the environment layer: toolchain bootstrap on
the managed al2023 base, then the lockfile-faithful install.
§The install commands are the lockfile-faithful spellings
uv sync --locked, npm ci, and cargo fetch --locked each refuse a lockfile
that disagrees with its manifest rather than quietly re-resolving — which is what
keeps the baked layer the thing the content hash says it is. uv sync without
--locked, npm install, or a bare cargo fetch would install something and
the hash would then name an environment the build did not produce.
§The bootstrap packages are measured, the full build is not yet
The managed base is al2023-minimal and ships no toolchain, so each line installs
its own. Package names and the binaries they land were verified against the
Amazon Linux 2023 repos (2026-08-31): python3.12-pip puts pip3.12 on PATH,
nodejs22-npm puts npm and node on PATH, cargo puts cargo on PATH.
install_weak_deps=0 keeps the layer minimal. A full in-guest build of each line
is the live-conformance scenario #74’s acceptance defers to — see the issue.
Cargo is the one that needs a stub: cargo fetch refuses a package with no
targets, so the line creates an empty src/main.rs first. The working tree synced
at launch lands over it.
Trait Implementations§
impl Copy for Ecosystem
impl Eq for Ecosystem
impl StructuralPartialEq for Ecosystem
Auto Trait Implementations§
impl Freeze for Ecosystem
impl RefUnwindSafe for Ecosystem
impl Send for Ecosystem
impl Sync for Ecosystem
impl Unpin for Ecosystem
impl UnsafeUnpin for Ecosystem
impl UnwindSafe for Ecosystem
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more