https://www.rust-lang.org/tools/install states that one can install Rust using WSL, which works fine. However, it seems like the rust-analyzer addon for VSCode can only leverage the rust installation of the host system by default as it cannot find the cargo installation during startup and fails with this message:
[ERROR rust_analyzer::main_loop] FetchWorkspaceError:
rust-analyzer failed to load workspace: "cargo" "--version" failed: program not found
Is there a way to configure rust-analyzer to use my WSL Rust installation?
Another option would of course be to use Dev Containers but that would be pretty cumbersome for the particular project I am working on.