| Crates.io | app_root_folder |
| lib.rs | app_root_folder |
| version | 0.1.0 |
| created_at | 2025-04-21 12:58:50.096982+00 |
| updated_at | 2025-04-21 12:58:50.096982+00 |
| description | Get the path to the app root folder |
| homepage | |
| repository | https://github.com/Alirex/rs_lib_i_app_root_folder |
| max_upload_size | |
| id | 1642646 |
| size | 13,674 |
Allows you to get the root folder path of the app.
This can be useful when CWD (current working directory) is not enough.
And the manifest directory is different.
You can see the same thing in Python as:
So, this can be useful, also, for projects that moving from Python (with this approach) to Rust.
This path can be used to access files from the repository, and that does not really depend on the implementation of the app.
Less boilerplate code. Call the function and get the result.
pre-commit install
pre-commit run --all-files
cargo update
Maybe you will be interested in:
Ways to get similar paths
Get the CWD (current working directory)
Path to the folder with the Cargo.toml file of the crate (not the workspace)