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
Architecture | deb_arch |
---|---|
x86_64 | amd64 |
aarch64 | arm64 |
riscv64 (riscv64gc) | riscv64 |
arm (feature = +vfpv3 ) | armhf |
arm | armel |
mips (endian = little) | mipsel |
mips64 (endian = little) | mips64el |
s390x | s390x |
powerpc64 (endian = little) | ppc64el |
x86 (i586/i686) | i386 |
other | consts::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);