exp: cross #2

This commit is contained in:
2025-12-20 00:06:07 +01:00
parent 8e9e19a6ca
commit 31bcd28c72
16 changed files with 1209 additions and 438 deletions

View File

@@ -6,3 +6,15 @@ pub mod package_info;
pub mod pull;
pub type ProgressCallback<'a> = Option<&'a dyn Fn(&str, &str, usize, usize)>;
/// Returns the architecture of current CPU, debian-compatible
pub fn get_current_arch() -> String {
match std::env::consts::ARCH {
"x86" => "i386".to_string(),
"x86_64" => "amd64".to_string(),
"arm" => "armhf".to_string(),
"aarch64" => "arm64".to_string(),
"powerpc64" => "ppc64el".to_string(),
x => x.to_string(),
}
}