@@ -269,7 +269,33 @@ pub mod windows_registry {
269
269
// Regardless of whether this should be in this crate's public API,
270
270
// it has been since 2015, so don't break it.
271
271
272
- pub use :: find_msvc_tools:: find; // Fine, only uses std types
272
+ /// Attempts to find a tool within an MSVC installation using the Windows
273
+ /// registry as a point to search from.
274
+ ///
275
+ /// The `arch_or_target` argument is the architecture or the Rust target name
276
+ /// that the tool should work for (e.g. compile or link for). The supported
277
+ /// architecture names are:
278
+ /// - `"x64"` or `"x86_64"`
279
+ /// - `"arm64"` or `"aarch64"`
280
+ /// - `"arm64ec"`
281
+ /// - `"x86"`, `"i586"` or `"i686"`
282
+ /// - `"arm"` or `"thumbv7a"`
283
+ ///
284
+ /// The `tool` argument is the tool to find. Supported tools include:
285
+ /// - MSVC tools: `cl.exe`, `link.exe`, `lib.exe`, etc.
286
+ /// - `MSBuild`: `msbuild.exe`
287
+ /// - Visual Studio IDE: `devenv.exe`
288
+ /// - Clang/LLVM tools: `clang.exe`, `clang++.exe`, `clang-*.exe`, `llvm-*.exe`, `lld.exe`, etc.
289
+ ///
290
+ /// This function will return `None` if the tool could not be found, or it will
291
+ /// return `Some(cmd)` which represents a command that's ready to execute the
292
+ /// tool with the appropriate environment variables set.
293
+ ///
294
+ /// Note that this function always returns `None` for non-MSVC targets (if a
295
+ /// full target name was specified).
296
+ pub fn find ( arch_or_target : & str , tool : & str ) -> Option < std:: process:: Command > {
297
+ :: find_msvc_tools:: find ( arch_or_target, tool)
298
+ }
273
299
274
300
/// A version of Visual Studio
275
301
#[ derive( Debug , PartialEq , Eq , Copy , Clone ) ]
0 commit comments