runas 0.1.3

Run a command as root (sudo)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate gcc;

use std::env;

fn main() {
    let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
    if target_os == "windows" {
        gcc::Build::new()
            .file("runas-windows.c")
            .compile("runas");
        println!("cargo:rustc-link-lib=ole32");
    } else if target_os == "macos" {
        gcc::Build::new()
            .file("runas-darwin.c")
            .compile("runas");
        println!("cargo:rustc-link-lib=framework=Security");
    }
}