which
A Rust equivalent of Unix command "which". Locate installed executable in cross platforms.
8.0.5
399M downloads/mo
#289 most downloaded on crates.io
harryfei/which-rs
What this package is like to depend on
Last release 1 months ago
15 Jul 2026
Release timing varies
gaps range from 8 days to 9 months
Some releases are documented
notes for 17 of 39 stable releases
4 versions withdrawn
withdrawn after publishing
11 years old
43 releases · first in 2015
5 releases in the last 12 months
see the full history below
Release timeline
43 releases · Oct 2015 to Jul 2026Releases
latest 43-
8.0.515 Jul 2026Release notes
Open source →What's Changed
- Fix absolute path lookup when cwd is disabled by @weifanglab in #126
New Contributors
- @weifanglab made their first contribution in #126
Full Changelog: 8.0.4...8.0.5
Release notes
Open source →- Bug fix: #126 Do not use current directory for search when provided path is absolute. Thanks @weifanglab for your contribution to which!
-
8.0.416 Jun 2026Release notes
Open source →- On Windows we now emit a
NonFatalErrorif thePATHEXTenvironment variable is not populated, and the query did not specify a file extension.
- On Windows we now emit a
-
8.0.308 Jun 2026Release notes
Open source →What's Changed
- feat: use catch-all cfg for
is_valid_executableon unsupported targets by @pmikolajczyk41 in #124
New Contributors
- @pmikolajczyk41 made their first contribution in #124
Full Changelog: 8.0.2...8.0.3
Release notes
Open source →- Add fallback implementation of
is_valid_executableallowingwhich-rsto compile on targets which are not Unix, Windows, WASI, or Redox. Thanks @pmikolajczyk41 for your contribution to which!
- feat: use catch-all cfg for
-
8.0.208 Mar 2026Release notes
Open source →What's Changed
- Remove
env_homedependency by @madsmtm in #118 - New windows impl by @Xaeroxe in #121
- Swap dependency on rustix for dependency on libc by @Xaeroxe in #122
New Contributors
Full Changelog: 8.0.1...8.0.2
Release notes
Open source →- Dependency on
home_envremoved, the implementation found in rust 1.85.0 for a home directory has been fixed. Thanks, [@madsmtm],(https://github.com/madsmtm) for this contribution to which! - Dependency on
winsaferemoved, code for Windows API is now handwritten. - Dependency on
rustixremoved, we now depend onlibcdirectly to reduce compile times.
- Remove
-
8.0.106 Mar 2026Release notes
Open source →- Fix Windows bug reported in https://github.com/harryfei/which-rs/issues/108#issuecomment-3998654328
-
8.0.005 Jun 2025Release notes
Open source →What's Changed
- Add new
Systrait to allow abstracting over the underlying filesystem. Particularly useful forwasm32-unknown-unknowntargets. Thanks @dsherret for this contribution to which! - Add more debug level tracing for otherwise silent I/O errors.
- Call the
NonFatalHandlerin more places to catch previously ignored I/O errors. - Remove use of the
eitherdependency.
New Contributors
Release notes
Open source →- Add new
Systrait to allow abstracting over the underlying filesystem. Particularly useful forwasm32-unknown-unknowntargets. Thanks @dsherret for this contribution to which! - Add more debug level tracing for otherwise silent I/O errors.
- Call the
NonFatalHandlerin more places to catch previously ignored I/O errors. - Remove use of the
eitherdependency.
- Add new
-
7.0.308 Apr 2025Release notes
Open source →- Update rustix to version 1.0. Congrats to rustix on this milestone, and thanks @mhils for this contribution to which!
Release notes
Open source →- Update rustix to version 1.0. Congrats to rustix on this milestone, and thanks @mhils for this contribution to which!
-
7.0.206 Feb 2025Release notes
Open source →- Don't return paths containing the single dot
.reference to the current directory, even if the original request was given in terms of the current directory. Thanks @jakobhellermann for this contribution!
Release notes
Open source →- Don't return paths containing the single dot
.reference to the current directory, even if the original request was given in terms of the current directory. Thanks @jakobhellermann for this contribution!
- Don't return paths containing the single dot
-
7.0.119 Dec 2024Release notes
Open source →- Get user home directory from
env_homeinstead ofhome. Thanks @micolous for this contribution! - If home directory is unavailable, do not expand the tilde to an empty string. Leave it as is.
- Get user home directory from
-
7.0.001 Nov 2024Release notes
Open source →- Add support to
WhichConfigfor a user provided closure that will be called whenever a nonfatal error occurs.
This technically breaks a few APIs due to the need to add more generics and lifetimes. Most code will compile
without changes.
Release notes
Open source →- Add support to
WhichConfigfor a user provided closure that will be called whenever a nonfatal error occurs. This technically breaks a few APIs due to the need to add more generics and lifetimes. Most code will compile without changes.
- Add support to
-
6.0.317 Aug 2024Release notes
Open source →- Enhance
tracingfeature with somedebuglevel logs for higher level logic.
- Enhance
-
6.0.230 Jul 2024Release notes
Open source →- Add
tracingfeature which outputs debugging information to thetracingecosystem.
- Add
-
6.0.122 Mar 2024Release notes
Open source →- Remove dependency on
once_cellfor Windows users, replace withstd::sync::OnceLock.
- Remove dependency on
-
6.0.018 Jan 2024 -
5.0.018 Oct 2023Release notes
Open source →- Remove several unused error messages
- Windows executables can now be found even if they don't have a '.exe' extension.
- Add new error message,
Error::CannotGetCurrentDirAndPathListEmpty
-
4.4.204 Sep 2023Release notes
Open source →- Remove dependency on
dirscrate due to MPL licensing in its tree. Usehomecrate instead. (@Xaeroxe)
- Remove dependency on
-
4.4.104 Sep 2023Release notes
Open source →- Add tilde expansion for home directory (@Xaeroxe)
- Swap out libc for rustix, forbid unsafe (@notgull)
-
4.4.020 Jan 2023Nothing published for this version
-
4.3.031 Aug 2022Nothing published for this version
-
4.2.520 Mar 2022Nothing published for this version
-
4.2.424 Jan 2022Nothing published for this version
-
4.2.324 Jan 2022 withdrawnNothing published for this version
-
4.2.231 Jul 2021Nothing published for this version
-
4.2.129 Jul 2021 withdrawnNothing published for this version
-
4.2.029 Jul 2021 withdrawnNothing published for this version
-
4.1.028 Mar 2021Nothing published for this version
-
4.0.204 Aug 2020Nothing published for this version
-
4.0.122 Jun 2020Nothing published for this version
-
4.0.030 May 2020Nothing published for this version
-
3.1.107 Mar 2020Nothing published for this version
-
3.1.003 Nov 2019Nothing published for this version
-
3.0.022 Sep 2019Nothing published for this version
-
2.0.127 Nov 2018Nothing published for this version
-
2.0.030 Mar 2018Nothing published for this version
-
1.0.517 Feb 2018Nothing published for this version
-
1.0.415 Feb 2018 withdrawnNothing published for this version
-
1.0.304 Oct 2017Nothing published for this version
-
1.0.214 Jun 2017Nothing published for this version
-
1.0.114 Jun 2017Nothing published for this version
-
1.0.008 Dec 2016Nothing published for this version
-
0.2.103 Aug 2016Nothing published for this version
-
0.2.009 Jun 2016Nothing published for this version
-
0.1.006 Oct 2015Nothing published for this version