pub enum BinaryTarget {
WindowsX64,
LinuxX64,
LinuxArm64,
DarwinArm64,
}Expand description
Target OS and architecture for compiled binaries.
Used as keys in package output maps (CLI binaries, Terraform providers, etc.) and for cross-compilation target selection during builds.
Variants§
WindowsX64
Windows x64 (x86_64-pc-windows-gnu)
LinuxX64
Linux x86_64 (musl)
LinuxArm64
Linux ARM64 (musl)
DarwinArm64
macOS ARM64 (Apple Silicon)
Implementations§
Source§impl BinaryTarget
impl BinaryTarget
Sourcepub const ALL: &'static [BinaryTarget]
pub const ALL: &'static [BinaryTarget]
All supported binary targets
Sourcepub const LINUX: &'static [BinaryTarget]
pub const LINUX: &'static [BinaryTarget]
Linux-only targets (for container/operator builds)
Sourcepub fn rust_target_triple(&self) -> &'static str
pub fn rust_target_triple(&self) -> &'static str
Get the Rust target triple for this platform
Sourcepub fn binary_extension(&self) -> &'static str
pub fn binary_extension(&self) -> &'static str
Get the binary extension for this platform
Sourcepub fn runtime_platform_id(&self) -> &'static str
pub fn runtime_platform_id(&self) -> &'static str
Get the platform identifier for runtime downloads (e.g., “linux-x64”)
Sourcepub fn bun_target(&self) -> &'static str
pub fn bun_target(&self) -> &'static str
Get the Bun cross-compilation target for bun build --compile --target
Sourcepub fn terraform_key(&self) -> &'static str
pub fn terraform_key(&self) -> &'static str
Terraform registry platform key (os_arch format)
Sourcepub fn terraform_os(&self) -> &'static str
pub fn terraform_os(&self) -> &'static str
Terraform OS string
Sourcepub fn terraform_arch(&self) -> &'static str
pub fn terraform_arch(&self) -> &'static str
Terraform architecture string
Sourcepub fn is_windows(&self) -> bool
pub fn is_windows(&self) -> bool
Check if this is a Windows target
Sourcepub fn linux_container_target() -> Self
pub fn linux_container_target() -> Self
Get the Linux container target matching the current host architecture. Containers always run Linux (even on macOS via Docker’s Linux VM), so we map the host architecture to the corresponding Linux target.
Sourcepub fn defaults_for_platform(platform: Platform) -> Vec<Self>
pub fn defaults_for_platform(platform: Platform) -> Vec<Self>
Get default targets for a platform
Sourcepub fn current_os() -> Self
pub fn current_os() -> Self
Detect the current OS target
Trait Implementations§
Source§impl Clone for BinaryTarget
impl Clone for BinaryTarget
Source§fn clone(&self) -> BinaryTarget
fn clone(&self) -> BinaryTarget
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BinaryTarget
impl Debug for BinaryTarget
Source§impl<'de> Deserialize<'de> for BinaryTarget
impl<'de> Deserialize<'de> for BinaryTarget
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>,
Source§impl Display for BinaryTarget
impl Display for BinaryTarget
Source§impl FromStr for BinaryTarget
impl FromStr for BinaryTarget
Source§impl Hash for BinaryTarget
impl Hash for BinaryTarget
Source§impl PartialEq for BinaryTarget
impl PartialEq for BinaryTarget
Source§impl Serialize for BinaryTarget
impl Serialize for BinaryTarget
impl Copy for BinaryTarget
impl Eq for BinaryTarget
impl StructuralPartialEq for BinaryTarget
Auto Trait Implementations§
impl Freeze for BinaryTarget
impl RefUnwindSafe for BinaryTarget
impl Send for BinaryTarget
impl Sync for BinaryTarget
impl Unpin for BinaryTarget
impl UnsafeUnpin for BinaryTarget
impl UnwindSafe for BinaryTarget
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.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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.