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

Add exec-env to set CARGO_HOME properly #32

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

uvlad7
Copy link

@uvlad7 uvlad7 commented Nov 7, 2023

No description provided.

@uvlad7 uvlad7 requested a review from a team as a code owner November 7, 2023 00:02
Copy link

@RobLoach RobLoach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems important, as it means that packages installed with cargo are specced to which version of rust you have installed. Thanks.

@RobLoach
Copy link

Should this also set CARGO_INSTALL_ROOT?

@uvlad7
Copy link
Author

uvlad7 commented Sep 30, 2024

to which version of rust you have installed

Yep, that's exactly why I've added this.

Should this also set CARGO_INSTALL_ROOT?

It works OK for me. I use this plugin in mise, and I have rustup version installed and linked into it'

vladimir@np940x5n:~/.local/share/mise$ mise list rust
Tool  Version           Config Source              Requested
rust  nightly                                               
rust  rustup (symlink)                                      
rust  1.72.1            ~/.config/mise/config.toml 1.72.1   
rust  1.73.0 (symlink)                                      
rust  1.77.1                                                
vladimir@np940x5n:~/.local/share/mise$ which evcxr
/home/vladimir/.local/share/mise/installs/rust/1.72.1/bin/evcxr
vladimir@np940x5n:~/.local/share/mise$ evcxr --version
evcxr_repl 0.16.0
vladimir@np940x5n:~/.local/share/mise$ mise shell rust@rustup
vladimir@np940x5n:~/.local/share/mise$ which evcxr
/home/vladimir/.local/share/mise/installs/rust/rustup/bin/evcxr
vladimir@np940x5n:~/.local/share/mise$ realpath $(which evcxr)
/home/vladimir/.cargo/bin/evcxr
vladimir@np940x5n:~/.local/share/mise$ evcxr --version
evcxr_repl 0.15.1

and it looks like CARGO_HOME is enough. CARGO_INSTALL_ROOT seems to be required only for separate bin dirs for the same rust version, or maybe a global installation, which, I believe, is not a default case.

@RobLoach
Copy link

👍 Been using this change locally too.

@smorimoto Any chance to get this merged? If you don't have capacity, if you add me as a maintainer, I'd be happy to help out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants