mirror of
https://github.com/nushell/nushell
synced 2025-01-03 16:58:58 +00:00
7e26b4fcc2
# Description Bumps `sysinfo` to 0.30. * Changelog https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md#0304 # User-Facing Changes N/A
18 lines
364 B
Rust
18 lines
364 B
Rust
pub fn get_os_name() -> &'static str {
|
|
std::env::consts::OS
|
|
}
|
|
|
|
pub fn get_os_arch() -> &'static str {
|
|
std::env::consts::ARCH
|
|
}
|
|
|
|
pub fn get_os_family() -> &'static str {
|
|
std::env::consts::FAMILY
|
|
}
|
|
|
|
pub fn get_kernel_version() -> String {
|
|
match sysinfo::System::kernel_version() {
|
|
Some(v) => v,
|
|
None => "unknown".to_string(),
|
|
}
|
|
}
|