location-macros - A collection of macros for obtaining the absolute path of the project root
Examples
-
Get the root directory of the current crate.
use crate_dir; let crate_dir = crate_dir!; println!;
-
Get the root directory of the workspace containing current crate.
use workspace_dir; let workspace_dir = workspace_dir!; println!;