Skip to main content

Module lockfile

Module lockfile 

Source
Expand description

Lockfile types for cuenv tool management.

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

§Structure (v3)

version = 3

# Runtime section - project runtime state
[runtimes."."]
type = "nix"
flake = "."
digest = "sha256:runtime..."
lockfile = "flake.lock"

# 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" }

[[tools_activation]]
var = "PATH"
op = "prepend"
separator = ":"
from = { type = "allBinDirs" }

# 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.
LockedNixRuntime
Locked metadata for a Nix runtime.
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.
LockedRuntime
A locked project runtime keyed by project path.

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.