pub struct Distribution {
pub adapter: DistributionAdapter,
pub gh_releases: bool,
pub installers: Vec<Installer>,
pub homebrew_tap: Option<String>,
pub platforms: Vec<String>,
}Expand description
The binary-distribution block: multi-platform GitHub-Release binaries, a generated installer set, and an optional Homebrew tap — produced by a tag-triggered release workflow (cargo-dist / goreleaser).
SEPARATE from Target (registry publishes): a cargo-dist repo attaches
per-platform binaries to its GitHub Release, ships a shell/Homebrew installer,
and independently publishes its crate to crates.io — the crates.io publish
is a Target; everything binary-distribution is this block. The two coexist,
which is exactly the “registry publish alongside a cargo-dist release” the
contract could not express before. First-class (not prose) so downstream
members SEE the tap + installer and neither under-describe the release nor
regenerate the existing release.yml.
Option on Contract: null for a registry-only repo (the common case),
so this addition leaves every existing contract’s shape unchanged.
Fields§
§adapter: DistributionAdapterThe binary-distribution engine that owns the tag-triggered release workflow.
gh_releases: boolWhether multi-platform binaries are attached to the GitHub Release.
installers: Vec<Installer>Installer flavors this release produces (may be empty), canonically ordered and de-duplicated.
homebrew_tap: Option<String>The Homebrew tap repo (owner/repo) the generated formula is pushed to,
or null when no tap is used. Required when installers includes
homebrew (floor).
platforms: Vec<String>The platform target set — the target-triples this binary distribution builds
and ships, in Rust target-triple form (the vocabulary the cargo-dist
adapter consumes; a goreleaser/manual remodel into an adapter-neutral
shape is deliberately left to a follow-up). Always non-empty in the canonical
output: defaulted to the cross-platform DEFAULT_CROSS_PLATFORM_TARGETS set
(macOS + Linux) when the source OMITS it (an explicit empty list is rejected,
not defaulted), so a distribution that doesn’t specify platforms still covers
Linux (the cross-platform install requirement). An explicit set is validated
per triple and de-duplicated, preserving the author’s order. Validation is
STRUCTURAL, not semantic — a well-formed triple whose OS component stays
inspectable, so the cross-platform audit can flag a Linux-less explicit set;
the normalizer guarantees only that the field is present and every triple
well-formed, never that the set covers any particular OS or that the toolchain
will build it.
Trait Implementations§
Source§impl Clone for Distribution
impl Clone for Distribution
Source§fn clone(&self) -> Distribution
fn clone(&self) -> Distribution
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Distribution
impl Debug for Distribution
impl Eq for Distribution
Source§impl PartialEq for Distribution
impl PartialEq for Distribution
Source§impl Serialize for Distribution
impl Serialize for Distribution
impl StructuralPartialEq for Distribution
Auto Trait Implementations§
impl Freeze for Distribution
impl RefUnwindSafe for Distribution
impl Send for Distribution
impl Sync for Distribution
impl Unpin for Distribution
impl UnsafeUnpin for Distribution
impl UnwindSafe for Distribution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.