Crate cargo_dist_schema

Crate cargo_dist_schema 

Source
Expand description

§cargo-dist-schema

This crate exists to serialize and deserialize the dist-manifest.json produced by dist. Ideally it should be reasonably forward and backward compatible with different versions of this format.

The root type of the schema is DistManifest.

Re-exports§

pub use target_lexicon;

Modules§

macros
Internal macros for cargo-dist

Macros§

declare_strongly_typed_string
Motivation

Structs§

AptPackageName
An APT package name, cf. https://en.wikipedia.org/wiki/APT_(software)
AptPackageNameRef
An APT package name, cf. https://en.wikipedia.org/wiki/APT_(software)
Artifact
A distributable artifact that’s part of a Release
ArtifactId
The unique ID of an Artifact
ArtifactIdRef
The unique ID of an Artifact
Asset
An asset contained in an artifact (executable, license, etc.)
AssetInfo
Info about an Asset (binary)
ChecksumExtension
A lowercase descriptor for a checksum algorithm, like “sha256” or “blake2b”.
ChecksumExtensionRef
A lowercase descriptor for a checksum algorithm, like “sha256” or “blake2b”.
ChecksumValue
A checksum value, usually the lower-cased hex string of the checksum
ChecksumValueRef
A checksum value, usually the lower-cased hex string of the checksum
ChocolateyPackageName
A chocolatey package name, cf. https://community.chocolatey.org/packages
ChocolateyPackageNameRef
A chocolatey package name, cf. https://community.chocolatey.org/packages
CiInfo
CI backend info
ContainerConfig
GitHub config that’s common between different kinds of jobs (global, local)
ContainerConfigInput
GitHub config that’s common between different kinds of jobs (global, local)
ContainerImage
A container image, like quay.io/pypa/manylinux_2_28_x86_64
ContainerImageRef
A container image, like quay.io/pypa/manylinux_2_28_x86_64
DashScript
A bit of shell script (that can run with /bin/sh), ran on CI runners. Can be multi-line.
DashScriptRef
A bit of shell script (that can run with /bin/sh), ran on CI runners. Can be multi-line.
DistManifest
A report of the releases and artifacts that dist generated
DynamicLibraryAsset
A C dynamic library artifact (so/dylib/dll)
EnvironmentVariables
Release-specific environment variables
ExecutableAsset
An executable artifact (exe/binary)
GithubAttestationsFilters
Used to capture GitHub Attestations filters
GithubCiInfo
Github CI backend
GithubGlobalJobConfig
Used in github/release.yml.j2 to template out “global” build jobs (plan, global assets, announce, etc)
GithubHosting
Github Hosting
GithubLocalJobConfig
Used in github/release.yml.j2 to template out “local” build jobs
GithubMatrix
Github CI Matrix
GithubRunner
The name of a Github Actions Runner, like ubuntu-22.04 or macos-13
GithubRunnerConfig
GitHub config that’s common between different kinds of jobs (global, local)
GithubRunnerConfigInput
The version of GithubRunnerConfig that’s deserialized from the config file: it has optional fields that are computed later.
GithubRunnerRef
The name of a Github Actions Runner, like ubuntu-22.04 or macos-13
GlibcVersion
Minimum glibc version required to run software
HomebrewPackageName
A homebrew package name, cf. https://formulae.brew.sh/
HomebrewPackageNameRef
A homebrew package name, cf. https://formulae.brew.sh/
Hosting
Possible hosting providers
Library
Represents a dynamic library located somewhere on the system
Linkage
Information about dynamic libraries used by a binary
PackageInstallScript
A bit of shell script to install brew/apt/chocolatey/etc. packages
PackageInstallScriptRef
A bit of shell script to install brew/apt/chocolatey/etc. packages
PackageVersion
A package version
PackageVersionRef
A package version
PipPackageName
A pip package name
PipPackageNameRef
A pip package name
PowershellScript
A bit of powershell script, ran on CI runners. Can be multi-line.
PowershellScriptRef
A bit of powershell script, ran on CI runners. Can be multi-line.
Release
A Release of an Application
StaticLibraryAsset
A C static library artifact (a/lib)
SystemInfo
Info about a system used to build this announcement.
TripleName
A rustc-like target triple/tuple (e.g. “x86_64-pc-windows-msvc”)
TripleNameRef
A rustc-like target triple/tuple (e.g. “x86_64-pc-windows-msvc”)
VersionInfo
Info about a manifest version

Enums§

ArtifactKind
A kind of Artifact
AssetKind
An artifact included in a Distributable
BuildEnvironment
Information about the build environment on this system
Format
More coarse-grained version info, indicating periods when significant changes were made
GhaRunStep
A GitHub Actions “run” step, either bash or powershell
GithubAttestationsPhase
Phase in which to generate GitHub attestations
PackageManager
Represents the package manager a library was installed by
PrRunMode
Type of job to run on pull request
StringLikeOr
A value or just a string

Constants§

DIST_EPOCH_1_MAX
The first epoch of cargo-dist, after this version a bunch of things changed and we don’t support that design anymore!
DIST_EPOCH_2_MAX
Second epoch of cargo-dist, after this we stopped putting versions in artifact ids. This changes the download URL, but everything else works the same.
SELF_VERSION
The current version of cargo-dist-schema

Functions§

check_version
Take serialized json and minimally parse out version info
format_of_version
Get the format for a given version

Type Aliases§

AssetId
The unique ID of an Asset
GithubRunners
Github runners configuration (which github image/container should be used to build which target).
LocalPath
A local system path on the machine dist was run.
RelPath
A relative path inside an artifact
SortedSet
A sorted set of values
SystemId
The unique ID of a System