pub enum PartialTarget {
Exact(String),
OsArch {
os: String,
arch: Option<String>,
},
Targets(Vec<String>),
}Expand description
A resolved partial build target filter.
Variants§
Exact(String)
Exact target triple match (e.g., x86_64-unknown-linux-gnu).
OsArch
Match by OS (and optionally arch) components.
Targets(Vec<String>)
Restrict to an explicit list of target triples. Used by the
Determinism Harness and release --targets=<csv> to drive
platform-sharded rebuilds: the build stage retains only those
configured targets that intersect the supplied list, leaving the
remaining cross-shard targets to sibling jobs.
Implementations§
Source§impl PartialTarget
impl PartialTarget
Sourcepub fn filter_targets(&self, targets: &[String]) -> Vec<String>
pub fn filter_targets(&self, targets: &[String]) -> Vec<String>
Filter a list of target triples to those matching this partial target.
Sourcepub fn dist_subdir(&self) -> String
pub fn dist_subdir(&self) -> String
Return the dist subdirectory name for this partial target.
Exact("x86_64-unknown-linux-gnu")→"x86_64-unknown-linux-gnu"OsArch { os: "linux", arch: None }→"linux"OsArch { os: "linux", arch: Some("amd64") }→"linux_amd64"Targets(["x86_64-...", "aarch64-..."])→"targets-x86_64-..."(first triple)
§Design note
A Go-style layout writes split shards to dist/$GOOS (or
dist/$GOOS_$GOARCH when partial.by: target). Anodizer
matches that shape for the OsArch variant — OsArch { os: "linux", arch: None } resolves to "linux", identical to the
dist/linux — but the Exact variant uses the full Rust target
triple instead of the Go-style <goos>_<goarch> (because the
triple is the natural granularity for Rust toolchains), and the
Targets variant is anodizer-only (drives the determinism
harness’s sharded matrix, not user-facing CI fan-out).
Practical consequence: split shards produced by anodizer cannot be merged by a Go-style consumer and vice versa. Anodizer’s CLI does not attempt cross-tool interop; the subdir name is purely internal to the per-tool merge step.
use anodizer_core::partial::PartialTarget;
// OsArch matches the `dist/linux` shape exactly.
assert_eq!(
PartialTarget::OsArch { os: "linux".into(), arch: None }.dist_subdir(),
"linux",
);
// Exact uses the full Rust triple (not `linux_amd64`).
assert_eq!(
PartialTarget::Exact("x86_64-unknown-linux-gnu".into()).dist_subdir(),
"x86_64-unknown-linux-gnu",
);Trait Implementations§
Source§impl Clone for PartialTarget
impl Clone for PartialTarget
Source§fn clone(&self) -> PartialTarget
fn clone(&self) -> PartialTarget
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 PartialTarget
impl Debug for PartialTarget
impl Eq for PartialTarget
Source§impl PartialEq for PartialTarget
impl PartialEq for PartialTarget
impl StructuralPartialEq for PartialTarget
Auto Trait Implementations§
impl Freeze for PartialTarget
impl RefUnwindSafe for PartialTarget
impl Send for PartialTarget
impl Sync for PartialTarget
impl Unpin for PartialTarget
impl UnsafeUnpin for PartialTarget
impl UnwindSafe for PartialTarget
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.