Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install To Platform-Standard Locations | Reduce Home Directory Clutter #476

Open
taep96 opened this issue Feb 19, 2025 · 5 comments
Open
Labels
enhancement New feature or request

Comments

@taep96
Copy link

taep96 commented Feb 19, 2025

Motivations

Files are currently placed directly in $HOME, which creates clutter. Using standard platform directories would improve system integration.

  • Would you like to implement this feature? — Not sure.

Solution

  1. Use directories crate with the following fallback order:

    1. $XDG_DATA_HOME/espup
    2. $HOME/.local/share/espup
    3. $HOME/.espup
  2. Add flag to optionally symlink export-esp.sh from $HOME to $XDG_DATA_HOME/espup/export-esp.sh

  3. Create an extension-less version of the script with a shebang and export to $PATH - the $HOME symlink could point to this instead

Alternatives

  • Add an environment variable to customize the location — $ESP_HOME

Additional context

The directories crate provides cross-platform support for standard directory locations.

@taep96 taep96 added the enhancement New feature or request label Feb 19, 2025
@SergioGasquez
Copy link
Member

Files are currently placed directly in $HOME??

What files do you mean, we only generate the export file in $HOME, and this can be modified with the -f, --export-file argument.

The Xtensa Rust toolchain, uses the RUSTUP_HOME environment variable, as rusutp does, to set where the toolchain is installed

@taep96
Copy link
Author

taep96 commented Feb 21, 2025

The .espup directory

Image

@SergioGasquez
Copy link
Member

The .espup is just a symlink, see #380. If we have different options of where it could leave, we will have to modify how esp-idf-sys behaves.

@taep96
Copy link
Author

taep96 commented Feb 24, 2025

Can the same cascade be implemented there?

@SergioGasquez
Copy link
Member

Yes, we could apply the same priority. That being said, implementing this won't be a priority for us, we would accept any contribution implementing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants