{"id":13599919,"url":"https://github.com/harryfei/which-rs","last_synced_at":"2025-05-14T09:06:43.684Z","repository":{"id":35127305,"uuid":"43744716","full_name":"harryfei/which-rs","owner":"harryfei","description":"A Rust equivalent of Unix command \"which\".","archived":false,"fork":false,"pushed_at":"2025-05-05T15:49:44.000Z","size":1204,"stargazers_count":225,"open_issues_count":2,"forks_count":54,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-14T09:05:30.845Z","etag":null,"topics":["binary-finder","rust","rust-equivalent","unix-command","which"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harryfei.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-10-06T10:47:06.000Z","updated_at":"2025-05-14T00:02:16.000Z","dependencies_parsed_at":"2022-07-14T08:17:15.599Z","dependency_job_id":"3bf6a556-85a8-4c43-bcd9-9d2263d4c5fa","html_url":"https://github.com/harryfei/which-rs","commit_stats":{"total_commits":164,"total_committers":34,"mean_commits":4.823529411764706,"dds":0.6585365853658536,"last_synced_commit":"1b5f7be8ca46e832d044adc2fec688e1cd0e9e53"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryfei%2Fwhich-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryfei%2Fwhich-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryfei%2Fwhich-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryfei%2Fwhich-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harryfei","download_url":"https://codeload.github.com/harryfei/which-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254110374,"owners_count":22016391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary-finder","rust","rust-equivalent","unix-command","which"],"created_at":"2024-08-01T17:01:18.433Z","updated_at":"2025-05-14T09:06:43.678Z","avatar_url":"https://github.com/harryfei.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"[![Build Status](https://github.com/harryfei/which-rs/actions/workflows/rust.yml/badge.svg)](https://github.com/harryfei/which-rs/actions/workflows/rust.yml)\n[![Actively Maintained](https://img.shields.io/badge/Maintenance%20Level-Actively%20Maintained-green.svg)](https://gist.github.com/cheerfulstoic/d107229326a01ff0f333a1d3476e068d)\n\n# which\n\nA Rust equivalent of Unix command \"which\". Locate installed executable in cross platforms.\n\n## Support platforms\n\n* Linux\n* Windows\n* macOS\n* wasm32-wasi*\n\n### A note on WebAssembly\n\nThis project aims to support WebAssembly with the [wasi](https://wasi.dev/) extension. This extension is a requirement. `which` is a library for exploring a filesystem, and\nWebAssembly without wasi does not have a filesystem. `which` cannot do anything useful without this extension. Issues and PRs relating to\n`wasm32-unknown-unknown` and `wasm64-unknown-unknown` will not be resolved or merged. All `wasm32-wasi*` targets are officially supported.\n\nIf you need to add a conditional dependency on `which` for this reason please refer to [the relevant cargo documentation for platform specific dependencies.](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies)\n\nHere's an example of how to conditionally add `which`. You should tweak this to your needs.\n\n```toml\n[target.'cfg(not(all(target_family = \"wasm\", target_os = \"unknown\")))'.dependencies]\nwhich = \"7.0.0\"\n```\n\n## Examples\n\n1) To find which rustc executable binary is using.\n\n    ``` rust\n    use which::which;\n\n    let result = which(\"rustc\").unwrap();\n    assert_eq!(result, PathBuf::from(\"/usr/bin/rustc\"));\n    ```\n\n2. After enabling the `regex` feature, find all cargo subcommand executables on the path:\n\n    ``` rust\n    use which::which_re;\n\n    which_re(Regex::new(\"^cargo-.*\").unwrap()).unwrap()\n        .for_each(|pth| println!(\"{}\", pth.to_string_lossy()));\n    ```\n\n## MSRV\n\nThis crate currently has an MSRV of Rust 1.70. Increasing the MSRV is considered a breaking change and thus requires a major version bump.\n\nWe cannot make any guarantees about the MSRV of our dependencies. You may be required to pin one of our dependencies to a lower version in your own Cargo.toml in order to compile\nwith the minimum supported Rust version. Eventually Cargo will handle this automatically. See [rust-lang/cargo#9930](https://github.com/rust-lang/cargo/issues/9930) for more.\n\n## Documentation\n\nThe documentation is [available online](https://docs.rs/which/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharryfei%2Fwhich-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharryfei%2Fwhich-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharryfei%2Fwhich-rs/lists"}