Function whatsys::kernel_version

source ·
pub fn kernel_version() -> Option<String>
Expand description

Get the version of the currently running kernel.

Note: The kernel version might include arbitrary alphanumeric suffixes.

Returns None if an error occured.

Examples found in repository?
examples/version.rs (line 2)
1
2
3
4
5
fn main() {
    println!("{:?}", whatsys::kernel_version());
    #[cfg(target_os = "windows")]
    println!("{:?}", whatsys::windows_build_number());
}