Crates.io | executable_path_finder |
lib.rs | executable_path_finder |
version | 0.0.3 |
source | src |
created_at | 2024-09-26 07:20:59.608795 |
updated_at | 2024-09-26 08:51:09.135174 |
description | A utility library for finding executable paths |
homepage | https://github.com/washanhanzi/executable_path_finder |
repository | https://github.com/washanhanzi/executable_path_finder |
max_upload_size | |
id | 1387101 |
size | 19,724 |
find executable path
use executable_path_finder::{find, find_with_cargo_home, find_in_env, find_in_path};
fn main() {
//find in PATH and env vars
let path = find("cargo");
println!("{:?}", path);
//find in PATH, env vars, and cargo home
let path = find_with_cargo_home("cargo");
println!("{:?}", path);
//find in PATH
let path = find_in_path("cargo");
println!("{:?}", path);
//find in env vars
let path = find_in_env("cargo");
println!("{:?}", path);
}