From 074ca13f1a865ecff0f4c619ab4812a2ba09c5a0 Mon Sep 17 00:00:00 2001 From: Albin Suresh Date: Wed, 27 Nov 2024 07:25:28 +0000 Subject: [PATCH 1/2] dev: Update rust dev tools --- justfile | 1 + 1 file changed, 1 insertion(+) diff --git a/justfile b/justfile index cc58dd56edb..f3e9cbcad56 100644 --- a/justfile +++ b/justfile @@ -46,6 +46,7 @@ default: # Install necessary tools install-tools: + rustup toolchain install nightly rustup component add rustfmt --toolchain nightly cargo install taplo-cli cargo-nextest From 77b214fff1d9d2509db2eaad3183069a3bf52ed2 Mon Sep 17 00:00:00 2001 From: Albin Suresh Date: Thu, 28 Nov 2024 03:23:00 +0000 Subject: [PATCH 2/2] dev: Add rust tools to the devcontainer image --- .devcontainer/Dockerfile | 8 +++++++- .devcontainer/devcontainer.json | 2 +- justfile | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 775cd372f24..8fdc433d2b0 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -89,7 +89,13 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ && pip3 install --upgrade pip --break-system-packages \ # # Delete the dummy systemctl command added by the base image - && rm -f /usr/local/bin/systemctl + && rm -f /usr/local/bin/systemctl \ + # + # Install rust tools + && rustup component add rls rust-analysis rust-src rustfmt clippy \ + && rustup toolchain install nightly \ + && rustup component add rustfmt --toolchain nightly \ + && cargo install taplo-cli cargo-nextest # Persist bash history USER root diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4aaa28f74cf..94e6b534ec7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -71,7 +71,7 @@ ] } }, - "postCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder} && rustup component add rls rust-analysis rust-src rustfmt clippy", + "postCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}", // Use root as there are some issues with cross using the docker commands in some environments (e.g. colima on MacOs) "remoteUser": "root" diff --git a/justfile b/justfile index f3e9cbcad56..3d6bb554605 100644 --- a/justfile +++ b/justfile @@ -46,6 +46,7 @@ default: # Install necessary tools install-tools: + rustup component add rls rust-analysis rust-src rustfmt clippy rustup toolchain install nightly rustup component add rustfmt --toolchain nightly cargo install taplo-cli cargo-nextest