Rust-analyzer failed to load workspace (Fedora 36/VSCodium) (Final error seems to be rustc -vV never executed). Many debugging steps already done

Here is the text inline from vscodium:

rust-analyzer failed to load workspace: Failed to read Cargo metadata from Cargo.toml file /home/brianbreniser/git/my_gitlab/financial-planner/Cargo.toml, cargo 1.62.0 (a748cf5a3 2022-06-08): Failed to run "/home/brianbreniser/.cargo/bin/cargo" "metadata" "--format-version" "1" "--manifest-path" "/home/brianbreniser/git/my_gitlab/financial-planner/Cargo.toml" "--filter-platform" "x86_64-unknown-linux-gnu": cargo metadata exited with an error: error: could not execute process rustc -vV (never executed)

Caused by:
No such file or directory (os error 2)


  • OS: Linux, Fedora v 36
  • VSCodium v 1.69.1 (Latest version in flatpak)

Short story:
I am building out a side-project with the Yew framework, I set up vscode with rust-analyzer for the first time a couple days ago and it worked great! I had awesome autocomplete and code intelligence and it all worked fine. Running all cargo commands locally and running with trunk serve works fine (And continues to do so). After checking out an unstable feature by installing rust nightly and running cargo +nightly check my vscodium editor began throwing the above error. Installing the nightly toolset may or may not have caused this issue, it seems unrelated, see debugging steps below.

Things I've tried

  • First thought. No such directory? It's trying to open the cargo.toml file which definitely does exit, and that command works flawlessly when I copy/paste into the terminal. I thought it might have been the flatpak container, but flatseal shows that it has full perms to my home directory and the rest of the machine, that should not be the issue.
  • Tried opening the editor with rust-analyzer on a fresh cargo new test directory, same error
  • I updated Fedora with dnf update
  • I updated all flatpak installs, including vscode/codium
  • I installed the same setup on my other laptop and got the EXACT same error (So something fishy is going on there).
  • cargo metadata works via command line
  • rustc -vV works via command line
  • running rust-analyzer --memory-usage (Or any other command arguments) returns unused arguments.??
  • tried uninstalling rust with rustup self uninstall and re-installing it
  • tried reinstalling all cargo tools
  • tried uninstalling and reinstalling all vscode/codium extensions
  • tried uninstalling vscode and reinstalling
  • tried removed the rust-analyzer-x86_64-unknown-linux-gnu bin from /home/brianbreniser/.var/app/com.vscodium.codium/config/VSCodium/User/globalStorage/matklad.rust-analyzer and let it auto-install it again

Alternative editors

I've tried getting the workflow up in other editors. These errors are unrelated, but I'm not sure if they hint at something deeper. At any rate they don't complain about rust-analyzer, but about macros and GLIBC_2.34

  • Using VSCode instead of VSCodium. Used VSCode v 1.69.1 (latest version in flatpak) and although rust-analyzer is not throwin an error, but something else is:

  • /usr/lib/x86_64-linux-gnu/ version `GLIBC_2.34' not found (required by /home/brianbreniser/git/my_gitlab/financial-planner/target/debug/deps/

  • using intellij I get a bunch of macro expansion errors like this:

  • cannot determine resolution for the attribute macro function_component Note: import resolution is stuck, try simplifying macro imports

I'm braindead and out of ideas. This might simply be part of the pre-release stage problems of rust-analyzer and the plugins. Maybe this fixes itself on the next point release?

Thanks for any ideas/help!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.