scsys_util/
project.rs

1/*
2    Appellation: project <module>
3    Contrib: @FL03
4*/
5/// Fetch the project root unless specified otherwise with a CARGO_MANIFEST_DIR env variable
6#[cfg(feature = "std")]
7pub fn project_root() -> std::path::PathBuf {
8    std::path::Path::new(&env!("CARGO_MANIFEST_DIR"))
9        .ancestors()
10        .nth(1)
11        .unwrap()
12        .to_path_buf()
13}