Expand description
On-disk I/O for the toolchain lockfile (zlayer-toolchains.lock).
The lockfile shapes (ToolchainLockfile, LockedTool) are pure serde
types in zlayer-types; this module adds the TOML load/save, the
(tool, platform, arch) lookup/upsert, and the sha256 recomputation helper.
The provisioning crate only ever consumes a lock (verifying downloads
against pinned digests) — it never writes one. The writer is the CLI
(zlayer toolchains lock).
A ToolchainLockfile is stored as TOML with a stable [[tool]] ordering
(sorted by (tool, platform, arch)), so the file is diff-friendly across
regenerations.
Structs§
- Locked
Tool - One pinned toolchain entry: an exact, integrity-checked resolution.
- Toolchain
Lockfile - The parsed toolchain lockfile: a schema tag, a generation timestamp, and the
set of pinned tools (serialized as a TOML
[[tool]]array of tables).
Constants§
- LOCKFILE_
NAME - Canonical file name for the toolchain lockfile.
- TOOLCHAIN_
LOCK_ SCHEMA - Current on-disk schema version for
ToolchainLockfile.
Traits§
- Toolchain
Lockfile Ext - I/O + query extension methods for the pure-serde
ToolchainLockfile.
Functions§
- compute_
sha256 - Compute the sha256 (bare lowercase hex) of the file at
path, streaming it in chunks so a large artifact never has to be fully buffered.