Name | Date | Size | ||
---|---|---|---|---|
.. | 25-Oct-2024 | 4 KiB | ||
.github/workflows/ | H | 25-Oct-2024 | 4 KiB | |
.gitignore | H A D | 25-Oct-2024 | 27 | |
BUILD.gn | H A D | 25-Oct-2024 | 1.1 KiB | |
Cargo.toml | H A D | 25-Oct-2024 | 676 | |
LICENSE.txt | H A D | 25-Oct-2024 | 1 KiB | |
README.md | H A D | 25-Oct-2024 | 860 | |
README.OpenSource | H A D | 25-Oct-2024 | 335 | |
src/ | H | 25-Oct-2024 | 4 KiB | |
tests/ | H | 25-Oct-2024 | 4 KiB |
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
README.OpenSource
1[ 2 { 3 "Name": "which-rs", 4 "License": "MIT", 5 "License File": "LICENSE", 6 "Version Number": "4.4.0", 7 "Owner": "fangting12@huawei.com", 8 "Upstream URL": "https://github.com/harryfei/which-rs", 9 "Description": "A Rust library that provides support for finding the path to an executable in the system's PATH." 10 } 11]