Files
pkh/src/lib.rs
2025-12-20 00:06:07 +01:00

21 lines
556 B
Rust

pub mod build;
pub mod changelog;
pub mod context;
pub mod deb;
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(),
}
}