pub struct TargetTuple {
pub goos: String,
pub goarch: String,
pub tags: Vec<String>,
}Expand description
One build target: (goos, goarch, tags). M1 populates exactly one
tuple per build; the compact resolve shape is future-proof for the
multi-target milestone.
Fields§
§goos: String§goarch: StringBuild tags in effect (already applied to each node’s go_files
by the encoder — Go-I6). Sorted for canonical suffixes.
Implementations§
Source§impl TargetTuple
impl TargetTuple
pub fn new( goos: impl Into<String>, goarch: impl Into<String>, tags: Vec<String>, ) -> Self
Sourcepub fn host() -> Self
pub fn host() -> Self
The build host’s tuple, in Go naming (macos→darwin, aarch64→arm64, x86_64→amd64). No tags. The M1 default when the caller supplies no explicit target.
Sourcepub fn from_rust_triple(triple: &str) -> Option<Self>
pub fn from_rust_triple(triple: &str) -> Option<Self>
Best-effort map from a Rust target triple (AdapterCtx.target,
e.g. aarch64-apple-darwin / x86_64-unknown-linux-musl) to a
Go (goos, goarch) tuple. Returns None when the OS token isn’t
recognized so the caller can fall back to host.
Trait Implementations§
Source§impl Clone for TargetTuple
impl Clone for TargetTuple
Source§fn clone(&self) -> TargetTuple
fn clone(&self) -> TargetTuple
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TargetTuple
impl Debug for TargetTuple
Source§impl<'de> Deserialize<'de> for TargetTuple
impl<'de> Deserialize<'de> for TargetTuple
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TargetTuple
Source§impl PartialEq for TargetTuple
impl PartialEq for TargetTuple
Source§impl Serialize for TargetTuple
impl Serialize for TargetTuple
impl StructuralPartialEq for TargetTuple
Auto Trait Implementations§
impl Freeze for TargetTuple
impl RefUnwindSafe for TargetTuple
impl Send for TargetTuple
impl Sync for TargetTuple
impl Unpin for TargetTuple
impl UnsafeUnpin for TargetTuple
impl UnwindSafe for TargetTuple
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
key and return true if they are equal.