rustup icon indicating copy to clipboard operation
rustup copied to clipboard

Please use FreeDesktop $HOME/.config/ directory recommendation for *nix systems

Open aplatypus opened this issue 1 year ago • 1 comments

Problem you are trying to solve

The rustup install shell script announces that it will load and create two related directories:

  • ~/.rustup
  • ~/.cargo

This adds to the burden of config data and metadata in dot-directories and dot-files on *nix systems. My personal practice is to place all dot- files and directories under the recommended ~/.config/ directory; even when I am forced to create symbolic a link, as in this example: ".mysql --> .config/mysql".

In the same section of rustup ... the script informs me that these locations can be modified respectively with:

  • RUSTUP_HOME and
  • CARGO_HOME

environment variables. At that point I cancelled the rustup shell install script and defined the relevant environment variables and re-ran the script with encouraging results. The initial preamble reported that the installer would use the:

  • ~/.config/rustup/
  • ~/.config/.cargo/

... directories defined by the respective environment variables. The installer did an excellent job "enabling" the specified directories. Well done rustup team :-D

Solution you'd like

I would prefer that the default configuration and metadata follow the OpenDesktop standard and place settings and data under the $HOME/.config/ directory.

The rustup script could use the environment variables FreeDesktop specification for setting environment variables.

  • https://www.freedesktop.org/software/systemd/man/environment.d.html

Furthermore, this allows users to keep configuration information under one umbrella directory and improve general admin and maintenance processing.

Notes

Please see:

  • #3123 and
  • #2883

... for a more rounded view of this opportunity.

  • I appreciate that there are challenges raised for non-systemd_ installations.
    • However, some common, reasonable and pragmatic approach would probably enhance the configuration and maintenance process in any case.
  • Personally speaking, I'd like to tame all ".-files" and have them under a common location like ~/.config/...

aplatypus avatar Oct 04 '23 15:10 aplatypus