Announcing process_path

process_path is a crate that makes it easy to get the path of the currently executing process. Thanks to Geoffroy Couprie for the idea!

The library currently provides one function:

pub fn get_executable_path() -> Option<PathBuf>;

The library uses various platform specific APIs to find the appropriate path rather than relying on argv[0] and supports the following platforms:

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

process_path is available on crates.io.

Please submit suggestions, bugs, and feature requests to the GitHub repository or ping me on Twitter. Pull requests welcome 😀