Skip to main content

Module pack

Module pack 

Source
Expand description

Pack manifests and deterministic .tuffpack artifacts.

Structs§

LoadedPack
A validated source pack rooted at its canonical filesystem directory.
LoadedPackMember
A validated pack member and its loaded capability manifest.
PackArtifact
A fully parsed and verified pack artifact.
PackArtifactCapability
Identity and release metadata for one artifact member.
PackArtifactContent
An artifact-relative path paired with its file bytes.
PackArtifactFile
Hash and byte length for one stored artifact file.
PackArtifactMetadata
Canonical metadata stored at the beginning of a pack artifact.
PackArtifactTarget
Pre-rendered adapter metadata stored in an artifact.
PackArtifactTargetCapability
Lifecycle metadata for one capability rendered to one target.
PackAuthor
Who publishes a pack.
PackBuild
Adapter targets rendered while building a pack.
PackImport
The origin of a pack imported from another bundle format.
PackManifest
Declarative source definition for a versioned capability pack.
PackMember
A local manifest-backed capability included in a pack.
PackUnsupported
One part of an imported source that the pack does not carry. Its files, when it has any, are kept under the pack’s extra/ folder.
ProjectPackSelection
Capability IDs selected from the current project’s tuff.lock.

Enums§

PackTargetKind
What a pack artifact target renders.

Constants§

ARTIFACT_MANIFEST_PATH
Where a version 2 artifact stores the pack’s manifest as written.
OLDEST_READABLE_PACK_ARTIFACT_VERSION
Oldest artifact format this Tuff release reads.
PACK_ARTIFACT_VERSION
Binary artifact format this Tuff release writes. Version 2 (RFC-110 D8) adds the optional manifest fields, host tables, the raw pack/tuff-pack.toml, and each target’s kind. Version 1 is still read.
PACK_MANIFEST_FILE
Canonical source-pack manifest filename.
PACK_SCHEMA_VERSION
Source-manifest schema understood by this Tuff release.

Functions§

extract_prefix
Extracts files below an artifact prefix into a missing or empty directory.
load_manifest
Loads and validates only the source-pack manifest and returns its canonical root.
load_pack
Loads and validates a source pack from a directory or tuff-pack.toml path.
manifest_bytes
The pack’s tuff-pack.toml as written, for ARTIFACT_MANIFEST_PATH. Host tables are kept byte for byte this way.
read_artifact
Reads and verifies a complete pack artifact.
read_artifact_bytes
Parses and verifies a complete pack artifact already loaded in memory.
source_contents
Collects the canonical manifest and declared source files for every pack member.
validate_relative_path
Normalizes a non-empty relative path and rejects traversal or platform prefixes.
write_artifact
Writes a deterministic pack artifact and returns its hexadecimal SHA-256 digest.
write_manifest
Writes a source pack manifest as deterministic TOML.