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

feat: Allow to install default rust packages #33

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

Conversation

Wihrt
Copy link

@Wihrt Wihrt commented Apr 5, 2024

The purpose of this Pull Request is to mimic the behavior of python or nodejs asdf plugin, and to allow to install default rust packages.
Each package will be installed inside the rust folder.

@Wihrt Wihrt requested a review from a team as a code owner April 5, 2024 08:05
@brennanfee
Copy link

Is this repo, and by extension this PR dead?

@Wihrt
Copy link
Author

Wihrt commented Aug 20, 2024

For the repo I cannot say. For the PR, I need to fix some things, but the main feature is present.
Hopefully, I will take a look this week ;)

@RobLoach
Copy link

~/.default-rust-packages doesn't really seem standard. Wouldn't you want this as a Cargo.toml instead?

…obbing issues

The changes made in the script include adding the -r flag to the read command to prevent backslashes from being interpreted as escape characters, and quoting variables to prevent word splitting and globbing issues. This ensures that the script behaves as expected and handles file paths and package names correctly.
@Wihrt
Copy link
Author

Wihrt commented Sep 30, 2024

Nor the different default-<whatever>-packages used to install packages ;)
I could handle both ways (1 package per line and TOML), but honestly, if this PR is merged, it would be already great ;)

The handling of the TOML format seems a 'Nice to have' feature, IMHO.

@Wihrt
Copy link
Author

Wihrt commented Sep 30, 2024

@smorimoto
For you review ;)

Comment on lines +82 to +84
for binary in "$ASDF_INSTALL_PATH/.cargo/bin"/*; do
ln -s "$binary" "$ASDF_INSTALL_PATH/bin/$(basename "$binary")"
done

Choose a reason for hiding this comment

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

With #32 , the cargo packages are installed directly into this folder, so no need to pass --root, or symlinking the binaries 😉

Copy link
Author

Choose a reason for hiding this comment

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

Good to know, but depends on this PR to be merged, or cherry-picking the modifications or this PR ;)

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.

4 participants