cicero_path/
lib.rs

1#![doc = include_str!("../README.md")]
2
3pub use cicero_path_core::target_dir;
4pub use repo_path::repo_path;
5
6use std::path::PathBuf;
7
8
9/// Root of your Cargo workspace. This is the directory where
10/// your `Cargo.lock` file and `target/` folder is placed.
11///
12/// This is equivalent to `repo_path!()` in most projects.
13/// The two differ, if your Rust code lives in a subfolder of a larger repository.
14pub fn workspace_dir() -> PathBuf {
15    cicero_path_core::USER_WORKSPACE_DIR.to_path_buf()
16}
17
18/// `Cargo.toml` file at the root of your workspace.
19pub fn workspace_cargo_toml() -> PathBuf {
20    cicero_path_core::USER_WORKSPACE_CARGO_TOML.to_path_buf()
21}