Skip to content

option to specify path to cargo executableΒ #21122

@DetachHead

Description

@DetachHead

in my project, cargo is installed to a python virtual environment using https://github.com/konstin/rustup-pypi. this works with the language server thanks to the rust-analyzer.server.path setting:

// .vscode/settings.json
{
    "rust-analyzer.server.path": ".venv/bin/rust-analyzer"
}

however there doesn't seem to be a setting to specify the path to the cargo executable, so i can't use the run/debug buttons in my main.rs:

2025-11-24 23:17:32.911 [error] Cargo invocation has failed: Error: could not launch cargo: Error: spawn cargo ENOENT

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-featureCategory: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions