whereismybin 0.0.1

Locates installed executable in PATH.
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 2 items with examples
  • Size
  • Source code size: 15.47 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.03 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • vadorovsky/whereismybin
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • vadorovsky

whereismybin

Locates installed executable inside directories specified in the PATH environment variable.

The goals of this implementations are:

  • No dependencies except the standard library.
  • No unsafe code, no syscalls, no calls to libc.
  • Compatibility with Miri.

Example

whereismybin can be used as a library. Example:

use std::process::Command;

use whereismybin::whereismybin;

let my_tool = whereismybin("my-tool").expect("Could not find my-tool");
let output = Command::new(my_tool)
    .arg("--some-arg")
    .output()
    .expect("Failed to execute process");
let content = output.stdout;

Why not which-rs?

The which-rs crate is great, but unfortunately it doesn't run on Miri and depends on libc crate. whereismybin aims to provide more lightweight alternative.

License: Apache-2.0