brson / brson/multirust

Add support for the XDG Base Directory Specification

Open
#104 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
651
Forks
35
PR merge metrics
No merged PRs in 30d

Description

I recommend storing:
- `~/.multirust/toolchains` under `$XDG_DATA_HOME/multirust`.
- `~/.multirust/default`, `~/.multirust/overrides` and `~/.multirust/version` under `$XDG_CONFIG_HOME/multirust`.
- `~/.multirust/cache` and `~/.multirust/update-hashes` under `$XDG_CACHE_HOME/multirust`.

You can find the specification [here](http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html).

This [blog post](https://ploum.net/207-modify-your-application-to-use-xdg-folders/) lists the advantages of using the XDG Base Directory Specification as follows:
- `$HOME` is a lot less cluttered.
- Backups are a lot more safer and easier (you know that creating a backup of your `$XDG_DATA_HOME` along with your files is enough).
- A lot easier to reset a default configuration if you want/need it (and without any risk of loosing information).
- Avoid some strange bugs that happen because you had a old version of some configuration file.
- It is a lot more flexible and portable because no paths are hard-coded. You can use the XDG library that does the job for you _or_, if you don’t want the dependency, implementing the XDG specification is only a few lines of code.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the code that handles the current ~/.multirust/toolchains, default, overrides, version, cache, and update-hashes paths. Read how those paths are selected and check the XDG Base Directory Specification linked in the issue. Done means each listed path uses the corresponding XDG directory while preserving the existing behavior when those variables are unset.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.