app_root_folder

Crates.ioapp_root_folder
lib.rsapp_root_folder
version0.1.0
created_at2025-04-21 12:58:50.096982+00
updated_at2025-04-21 12:58:50.096982+00
descriptionGet the path to the app root folder
homepage
repositoryhttps://github.com/Alirex/rs_lib_i_app_root_folder
max_upload_size
id1642646
size13,674
Alirex Prime (Alirex)

documentation

https://docs.rs/app_root_folder

README

App root folder


pre-commit

Allows you to get the root folder path of the app.

🤔 Why?

Why do I need this?

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:

  • BASE_DIR
  • ROOT_DIR

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.

Why do I need this library? And not implement it by myself?

Less boilerplate code. Call the function and get the result.

🛠️ Dev

Register pre-commit hooks

pre-commit install

Run pre-commit hooks

pre-commit run --all-files

Update dependencies

cargo update

Other

Maybe you will be interested in:

Commit count: 3

cargo fmt