diff --git a/README.md b/README.md index 3e18fc6..e8c8b2b 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,22 @@ A Rust equivalent of Unix command "which". Locate installed executable in cross * Linux * Windows * macOS +* wasm32-wasi* + +### A note on WebAssembly + +This 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 +WebAssembly without wasi does not have a filesystem. `which` cannot do anything useful without this extension. Issues and PRs relating to +`wasm32-unknown-unknown` and `wasm64-unknown-unknown` will not be resolved or merged. All `wasm32-wasi*` targets are officially supported. + +If 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) + +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 = "6.0.3" +``` ## Examples