Function envpath::consts::get_deb_arch

source ·
pub const fn get_deb_arch() -> &'static str
Expand description

Returns a string indicating the Debian architecture based on the current target architecture and any additional features.

Returns

A string representing the Debian architecture, e.g. “amd64”, “riscv64”, “arm64”, “ppc64el”.

Table

Architecturedeb_arch
x86_64amd64
aarch64arm64
riscv64 (riscv64gc)riscv64
arm (feature = +vfpv3)armhf
armarmel
mips (endian = little)mipsel
mips64 (endian = little)mips64el
s390xs390x
powerpc64 (endian = little)ppc64el
x86 (i586/i686)i386
otherconsts::ARCH

Examples

let deb_arch = envpath::consts::get_deb_arch();
println!("Debian architecture: {}", deb_arch);

#[cfg(target_arch = "x86_64")]
assert_eq!("amd64", deb_arch);