which 8.0.2

A Rust equivalent of Unix command "which". Locate installed executable in cross platforms.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[cfg(all(windows, target_arch = "x86"))]
#[link(
    name = "kernel32.dll",
    kind = "raw-dylib",
    modifiers = "+verbatim",
    import_name_type = "undecorated"
)]
extern "system" {
    pub fn GetBinaryTypeW(app_name: *const u16, bin_type: *mut u32) -> i32;
    pub fn GetLastError() -> u32;
}

#[cfg(all(windows, not(target_arch = "x86")))]
#[link(name = "kernel32.dll", kind = "raw-dylib", modifiers = "+verbatim")]
extern "system" {
    pub fn GetBinaryTypeW(app_name: *const u16, bin_type: *mut u32) -> i32;
    pub fn GetLastError() -> u32;
}