# Cicero Path

Access paths in your repository, with compile-time checks.

```rust
use cicero_path::repo_path;

let readme = repo_path!("README.md");
let doc_index = repo_path!("doc/src/index.md");
```

The macro checks whether the path exists and constructs a `PathBuf`.
If the path does not exist, the compiler will error during compilation:

```rust,compile_fail
use cicero_path::repo_path;

let non_existent = repo_path!("non/existent/path.txt");
```

This allows you to move files around without having to worry that a reference silently breaks, similar to the way `std::include!()` works.


## How it works

During compilation, the macro looks for the `.git` directory to determine the root of your repository.  
Then it joins the path you specified to the root and checks if the resulting path exists.

The path of your repository root is cached during compilation, so that you can use `repo_path!()` many times without a significant compile-time burden.
