Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
.github/workflows/ | 03-May-2024 | - | 94 | 75 | ||
src/ | 03-May-2024 | - | 1,013 | 668 | ||
tests/ | 03-May-2024 | - | 405 | 330 | ||
.cargo_vcs_info.json | D | 03-May-2024 | 94 | 6 | 6 | |
.gitignore | D | 03-May-2024 | 27 | 4 | 3 | |
Android.bp | D | 03-May-2024 | 972 | 41 | 37 | |
Cargo.toml | D | 03-May-2024 | 1.2 KiB | 51 | 43 | |
Cargo.toml.orig | D | 03-May-2024 | 676 | 27 | 22 | |
LICENSE | D | 03-May-2024 | 1 KiB | 20 | 16 | |
LICENSE.txt | D | 03-May-2024 | 1 KiB | 20 | 16 | |
METADATA | D | 03-May-2024 | 658 | 24 | 22 | |
MODULE_LICENSE_MIT | D | 03-May-2024 | 0 | |||
OWNERS | D | 03-May-2024 | 40 | 2 | 1 | |
README.md | D | 03-May-2024 | 860 | 36 | 22 | |
TEST_MAPPING | D | 03-May-2024 | 287 | 15 | 14 | |
cargo2android.json | D | 03-May-2024 | 53 | 5 | 5 |
README.md
1[](https://github.com/harryfei/which-rs/actions/workflows/rust.yml) 2 3# which 4 5A Rust equivalent of Unix command "which". Locate installed executable in cross platforms. 6 7## Support platforms 8 9* Linux 10* Windows 11* macOS 12 13## Examples 14 151) To find which rustc executable binary is using. 16 17 ``` rust 18 use which::which; 19 20 let result = which("rustc").unwrap(); 21 assert_eq!(result, PathBuf::from("/usr/bin/rustc")); 22 ``` 23 242. After enabling the `regex` feature, find all cargo subcommand executables on the path: 25 26 ``` rust 27 use which::which_re; 28 29 which_re(Regex::new("^cargo-.*").unwrap()).unwrap() 30 .for_each(|pth| println!("{}", pth.to_string_lossy())); 31 ``` 32 33## Documentation 34 35The documentation is [available online](https://docs.rs/which/). 36