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
)Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.