pub enum BuildPlatform {
Target,
Host,
}
Expand description
Either the target or the host platform.
When Cargo computes the platforms it is building on, it computes two separate build graphs: one for the target platform and one for the host. This is most useful in cross-compilation situations where the target is different from the host, but the separate graphs are computed whether or not a build cross-compiles.
A cargo check
can be looked at as a kind of cross-compilation as well–machine code is
generated and run for the host platform but not the target platform. This is why cargo check
output usually has some lines that say Compiling
(for the host platform) and some that say
Checking
(for the target platform).
Variants§
Target
The target platform.
This represents the packages and features that are included as code in the final build artifacts.
Host
The host platform.
This represents build scripts, proc macros and other code that is run on the machine doing the compiling.
Implementations§
Trait Implementations§
source§impl Clone for BuildPlatform
impl Clone for BuildPlatform
source§fn clone(&self) -> BuildPlatform
fn clone(&self) -> BuildPlatform
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BuildPlatform
impl Debug for BuildPlatform
source§impl Display for BuildPlatform
impl Display for BuildPlatform
source§impl Hash for BuildPlatform
impl Hash for BuildPlatform
source§impl Ord for BuildPlatform
impl Ord for BuildPlatform
source§fn cmp(&self, other: &BuildPlatform) -> Ordering
fn cmp(&self, other: &BuildPlatform) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for BuildPlatform
impl PartialEq for BuildPlatform
source§impl PartialOrd for BuildPlatform
impl PartialOrd for BuildPlatform
impl Copy for BuildPlatform
impl Eq for BuildPlatform
impl StructuralPartialEq for BuildPlatform
Auto Trait Implementations§
impl Freeze for BuildPlatform
impl RefUnwindSafe for BuildPlatform
impl Send for BuildPlatform
impl Sync for BuildPlatform
impl Unpin for BuildPlatform
impl UnwindSafe for BuildPlatform
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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