process_path 0.1.1

A Rust library to get the path of the currently executing process.
Documentation

process_path

A Rust library to get the path of the currently executing process.

Usage

Add this to your Cargo.toml:

[dependencies]
process_path = "0.1"

and this to your crate root:

extern crate process_path;

Example

This program prints its path to stdout:

extern crate process_path;

use process_path::get_executable_path;

fn main() {
    let path = get_executable_path();
    match path {
        None => println!("The process path could not be determined"),
        Some(path) => println!("{:?}", path)
    }
}

Supported Platforms

Platform Underlying API
Linux readlink(/proc/self/exe)
macOS _NSGetExecutablePath()
Windows GetModuleFileName()

License

Copyright Wesley Wiser and process_path contributors.

Licensed under either of

at your option.