libscu 3.0.2

crate for fetching software/hardware info on Unix-like OSs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Required features: hostname

use libscu::software::hostname;

fn main() {
    #[cfg(target_os = "macos")]
    let raw = true;

    if let Ok(hostname) = hostname::fetch(
        #[cfg(target_os = "macos")]
        raw,
    ) {
        println!("Hostname: {hostname}");
    }
}