Skip to content

add cargo as dependency to nix dev shell#155342

Open
quiode wants to merge 1 commit intorust-lang:mainfrom
quiode:nix-flake-update
Open

add cargo as dependency to nix dev shell#155342
quiode wants to merge 1 commit intorust-lang:mainfrom
quiode:nix-flake-update

Conversation

@quiode
Copy link
Copy Markdown
Contributor

@quiode quiode commented Apr 15, 2026

The rust-analyzer vscode extension needs to execute cargo metadata before being able to build anything. This PR adds this dependency to the nix shell for it to work.
The ideal solution would be to remove this dependency in rust-analyzer or use the locally built version, so help / hints to achieve that would be appreciated.

The problematic error:

rust-analyzer failed to load workspace: Failed to load the project at /rust/src/tools/rust-analyzer/Cargo.toml: Failed to read Cargo metadata from Cargo.toml file /rust/src/tools/rust-analyzer/Cargo.toml, None: Failed to run `cd "/rust/src/tools/rust-analyzer" && RUSTC_BOOTSTRAP="1" RUSTUP_AUTO_INSTALL="0" "cargo" "metadata" "--format-version" "1" "--manifest-path" "/rust/src/tools/rust-analyzer/Cargo.toml" "--filter-platform" "x86_64-unknown-linux-gnu"`: No such file or directory (os error 2)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 15, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 15, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Fallback group: @Mark-Simulacrum, @jieyouxu
  • @Mark-Simulacrum, @jieyouxu expanded to Mark-Simulacrum, jieyouxu

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

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants