pub enum Resolution {
NativeCross,
CrossDocker,
Emulate {
docker_platform: String,
},
Offload {
target: String,
},
Skip {
reason: String,
},
}Expand description
The verdict of resolve for one step’s platform triple-set (R531-F3,
W222): how QED should satisfy a “build for target T” / “pull image P”
step on the host it actually runs on.
The ordering encodes W222’s cross-compile first, emulate last ladder: a target that can be built with a host-native linker always is; emulation is an explicit, named fallback for the residue, never the silent default.
Variants§
NativeCross
Tier 1 — host-native cross-compile (cargo-zigbuild / musl-cross), no
container, no emulation. The default path for the overwhelming
majority of Rust targets (W222: ~99%). Also covers a plain host-native
build (target absent or host-arch).
CrossDocker
Tier 2 — cross via a host-arch toolchain container. The toolchain
runs in a container, but the container’s arch matches the host so this
is genuinely emulation-free (unlike a foreign-arch cross image, which
resolves to Emulate). Chosen when the target isn’t
host-native crossable but a host-arch cross image can build it.
Emulate
Tier 3 — QEMU / platform virtualization. The step pulls a foreign-arch
image (docker_platform) and runs it under emulation. This is the
W222 mesofact case (linux/amd64 cross-rs image on an arm64 host) and
multi-arch buildx image builds, where there is no cross-compile for
an image. Slow and explicit — the preflight (T4) flags it so the
operator sees the cost before the run.
Offload
No local path: the target can’t be host-native crossed and no container
can build it here (e.g. *-apple-darwin from a Linux host) — it needs
a real runner capable of building target. The scheduler picks the
concrete remote (P2+); the verdict just names what’s needed.
Skip
Nothing resolvable: a foreign target with an unrecognized arch and no container — QED can neither cross it, emulate it, nor name a runner for it. Carries a human-readable reason for the preflight.
Implementations§
Source§impl Resolution
impl Resolution
Sourcepub fn label(&self) -> String
pub fn label(&self) -> String
Short human label with the cost/mechanism parenthetical, for the T4 portability preflight and the QED detail pane.
Sourcepub fn is_slow_or_unsatisfiable(&self) -> bool
pub fn is_slow_or_unsatisfiable(&self) -> bool
True for the emulation / offload tiers — the verdicts that mean “this step will not run fast (or at all) on this host”. The preflight uses this to flag divergence; tier 1/2 (NativeCross / CrossDocker) are the emulation-free happy path.
Trait Implementations§
Source§impl Clone for Resolution
impl Clone for Resolution
Source§fn clone(&self) -> Resolution
fn clone(&self) -> Resolution
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 Resolution
impl Debug for Resolution
impl Eq for Resolution
Source§impl PartialEq for Resolution
impl PartialEq for Resolution
impl StructuralPartialEq for Resolution
Auto Trait Implementations§
impl Freeze for Resolution
impl RefUnwindSafe for Resolution
impl Send for Resolution
impl Sync for Resolution
impl Unpin for Resolution
impl UnsafeUnpin for Resolution
impl UnwindSafe for Resolution
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> Fruit for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more