Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ A Rust equivalent of Unix command "which". Locate installed executable in cross

This project aims to support WebAssembly with the [WASI](https://wasi.dev/) extension. All `wasm32-wasi*` targets are officially supported.

If you need to add a conditional dependency on `which` please refer to [the relevant cargo documentation for platform specific dependencies.](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies)
If you need to add a conditional dependency on `which` please refer to [the relevant Cargo documentation for platform specific dependencies.](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies)

Here's an example of how to conditionally add `which`. You should tweak this to your needs.

```toml
[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies]
which = "7.0.0"
which = "8.0.0"
```

Note that non-WASI environments have no access to the system. Using this in that situation requires disabling the default features of this crate and providing a custom `which::sys::Sys` implementation to `which::WhichConfig`.
Expand All @@ -38,7 +38,7 @@ Note that non-WASI environments have no access to the system. Using this in that
assert_eq!(result, PathBuf::from("/usr/bin/rustc"));
```

2. After enabling the `regex` feature, find all cargo subcommand executables on the path:
2. After enabling the `regex` feature, find all Cargo subcommand executables on the path:

``` rust
use which::which_re;
Expand Down
Loading