Skip to content

Commit

Permalink
Update rust feature (#275)
Browse files Browse the repository at this point in the history
* Update rust feature

Also adds completions for bash

* Update features/src/rust/install.sh

* bump rust feature version

* update rust version in scenario test

---------

Co-authored-by: Paul Taylor <178183+trxcllnt@users.noreply.github.com>
Co-authored-by: ptaylor <paul.e.taylor@me.com>
  • Loading branch information
3 people authored Apr 24, 2024
1 parent 2297d19 commit 069579f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion features/src/rust/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "rust",
"version": "24.6.0",
"version": "24.6.1",
"name": "Rust",
"documentationURL": "https://github.com/rapidsai/devcontainers/features/tree/main/src/rust",
"description": "Installs Rust, common Rust utilities, and their required dependencies",
Expand Down
6 changes: 5 additions & 1 deletion features/src/rust/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ fi

echo "Installing common Rust dependencies...";

rustup component add rls rust-analysis rust-src rustfmt clippy 2>&1;
rustup component add rust-analyzer rust-src rustfmt clippy 2>&1;

# Add CARGO_HOME, RUSTUP_HOME and bin directory into bashrc/zshrc files (unless disabled)
if [ "${UPDATE_RC}" = "true" ]; then
Expand All @@ -145,6 +145,10 @@ if [ "${UPDATE_RC}" = "true" ]; then
add_etc_profile_d_script rust "$(cat .bashrc | envsubst "${vars_%,}")";
fi

# Completion
rustup completions bash | tee /usr/share/bash-completion/completions/rustup > /dev/null
rustup completions bash cargo | tee /usr/share/bash-completion/completions/cargo > /dev/null

# Make files writable for rustlang group
chmod -R g+r+w "${RUSTUP_HOME}" "${CARGO_HOME}";

Expand Down
2 changes: 1 addition & 1 deletion features/test/rust/rust_at_pinned_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ source dev-container-features-test-lib
# Definition specific tests
check "cargo version" cargo --version
check "rustc version" rustc --version
check "correct rust version" rustc --version | grep 1.62.0
check "correct rust version" rustc --version | grep 1.64.0

# Report result
reportResults
2 changes: 1 addition & 1 deletion features/test/rust/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": "16"
},
"rust": {
"version": "1.62.0"
"version": "1.64.0"
}
},
"overrideFeatureInstallOrder": [
Expand Down

0 comments on commit 069579f

Please sign in to comment.