GithubHelp home page GithubHelp logo

alyoshavasilieva / which-rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from harryfei/which-rs

0.0 0.0 0.0 1.14 MB

A Rust equivalent of Unix command "which".

License: MIT License

Rust 100.00%

which-rs's Introduction

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()));

MSRV

This crate currently has an MSRV of Rust 1.70. Increasing the MSRV is considered a breaking change and thus requires a major version bump.

We cannot make any guarantees about the MSRV of our dependencies. You may be required to pin one of our dependencies to a lower version in your own Cargo.toml in order to compile with the minimum supported Rust version. Eventually Cargo will handle this automatically. See rust-lang/cargo#9930 for more.

Documentation

The documentation is available online.

which-rs's People

Contributors

harryfei avatar xaeroxe avatar luser avatar guangie88 avatar marijns95 avatar fdncred avatar harryfei2 avatar notgull avatar mverleg avatar spl avatar faern avatar wlbf avatar marier-nico avatar milo123459 avatar jcaesar avatar xiaobin0860 avatar silwol avatar waynr avatar symphorien avatar bzomak avatar n3xed avatar matthiasbeyer avatar cuviper avatar ever0de avatar frewsxcv avatar chris-morgan avatar charlespierce avatar atul9 avatar alexanderkjall avatar prokopyl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.