xxlight fd3134d404 check cxx and bindgen tests
Issue: https://gitee.com/xxlight/third_party_rust_which-rs/issues/I7169Y
Signed-off-by: xxlight <xiaoxiaoliang2@huawei.com>
Change-Id: I7e817a9f1f7b125cda2b704437ba4d680ce21552
2023-05-08 11:50:39 +08:00
2022-08-29 23:10:08 -06:00
2023-01-20 17:11:35 +08:00
2015-10-06 19:24:01 +08:00
2021-11-30 22:31:44 +01:00
2023-05-08 11:50:39 +08:00

Build Status

which

A Rust equivalent of Unix command "which". Locate installed executable in cross platforms.

Support platforms

  • Linux
  • Windows
  • macOS

Examples

  1. To find which rustc executable binary is using.

    use which::which;
    
    let result = which("rustc").unwrap();
    assert_eq!(result, PathBuf::from("/usr/bin/rustc"));
    
  1. After enabling the regex feature, find all cargo subcommand executables on the path:

    use which::which_re;
    
    which_re(Regex::new("^cargo-.*").unwrap()).unwrap()
        .for_each(|pth| println!("{}", pth.to_string_lossy()));
    

Documentation

The documentation is available online.

Description
No description provided
Readme 222 KiB
Languages
Rust 100%