Skip to main content

Module lockfile

Module lockfile 

Source
Expand description

Lockfile types for cuenv tool management.

The lockfile (cuenv.lock) stores resolved tool digests for reproducible, hermetic builds. It supports multiple tool sources: GitHub releases, Nix flakes, and OCI images.

§Structure (v2)

version = 2

# Tools section - multi-source tool management
[tools.jq]
version = "1.7.1"

  [tools.jq.platforms."darwin-arm64"]
  provider = "github"
  digest = "sha256:abc..."
  source = { repo = "jqlang/jq", tag = "jq-1.7.1", asset = "jq-macos-arm64" }

  [tools.jq.platforms."linux-x86_64"]
  provider = "github"
  digest = "sha256:def..."
  source = { repo = "jqlang/jq", tag = "jq-1.7.1", asset = "jq-linux-amd64" }

[tools.rust]
version = "1.83.0"

  [tools.rust.platforms."darwin-arm64"]
  provider = "nix"
  digest = "sha256:ghi..."
  source = { flake = "nixpkgs", package = "rustc" }

# Legacy artifacts section (for OCI images)
[[artifacts]]
kind = "image"
image = "nginx:1.25-alpine"

  [artifacts.platforms]
  "linux-x86_64" = { digest = "sha256:abc...", size = 1234567 }

Structs§

LockedArtifact
A locked OCI artifact with platform-specific digests.
LockedTool
A locked tool with version and per-platform resolution (v2+).
LockedToolPlatform
Platform-specific tool resolution data (v2+).
Lockfile
The root lockfile structure.
PlatformData
Platform-specific artifact data.

Enums§

ArtifactKind
The kind of OCI artifact.

Constants§

LOCKFILE_NAME
Filename for the lockfile.
LOCKFILE_VERSION
Current lockfile format version.

Functions§

current_platform
Get the current platform string.
normalize_platform
Normalize a platform string to our canonical format.