rust-lang / rust-lang/rust-analyzer

Feature request, code lens run in release mode

Open
#5,825 4 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-config A-ide S-actionable
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

My runner is generally dfu a binary to a device so Id like to be in release mode. I suppose I could just override the debug release mode, but it feels meh.

I searched config a bit and thought I had to ideas, but they didnt seem to work

rust-analyzer.cargoRunner takes an extension name, not a local exe so I cant sneak cargo run --release there

I realized I could sneak an environvariable with runnableEnv but I think its not being injected to cargo, only the result
"rust-analyzer.runnableEnv": {
"PROFILE": "release"
}

Thoughts?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how rust-analyzer.cargoRunner launches runnable targets and how rust-analyzer.runnableEnv is passed to Cargo. Confirm where the release profile should be selected, then verify that code-lens runs use release mode without changing the default debug behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.