systemconfiguration-rs 0.5.0

Safe Rust bindings for Apple's SystemConfiguration framework via a Swift bridge on macOS
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use systemconfiguration::ConsoleUser;

fn main() {
    match ConsoleUser::current() {
        Some(user) => println!(
            "console_user={} uid={} gid={}",
            user.name(),
            user.uid(),
            user.gid()
        ),
        None => println!("no console user"),
    }
}