Bug: 153120169

Clone this repo:
  1. fab8377 Import 'which' package version 3.1.1 by Chih-Hung Hsieh · 7 weeks ago master sdk-release platform-tools-30.0.0
  2. 3bdad64 Initial empty repository by Inna Palant · 8 weeks ago

Travis Build Status Appveyor Build status


A Rust equivalent of Unix command “which”. Locate installed executable in cross platforms.

Support platforms

  • Linux
  • Windows
  • macOS


To find which rustc exectable binary is using.

use which::which;

let result = which::which("rustc").unwrap();
assert_eq!(result, PathBuf::from("/usr/bin/rustc"));


By default this crate exposes a failure based error. This is optional, disable the default features to get an error type implementing the standard library Error trait.


The documentation is available online.