nu_system/
os_info.rs

1pub fn get_os_name() -> &'static str {
2    std::env::consts::OS
3}
4
5pub fn get_os_arch() -> &'static str {
6    std::env::consts::ARCH
7}
8
9pub fn get_os_family() -> &'static str {
10    std::env::consts::FAMILY
11}
12
13pub fn get_kernel_version() -> String {
14    match sysinfo::System::kernel_version() {
15        Some(v) => v,
16        None => "unknown".to_string(),
17    }
18}