rust-lang / rust-lang/rust-analyzer
Cargo extra env per platform
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Hey!
I'm developing cross platform desktop app, and I need to set different cargo extra env per platforms.
eg. on Windows I have:
"rust-analyzer.cargo.extraEnv": {
"FFMPEG_DIR": "C:\\Users\\User\\Documents\\code\\vibe\\desktop\\src-tauri\\ffmpeg",
"OPENBLAS_PATH": "C:\\Users\\User\\Documents\\code\\vibe\\desktop\\src-tauri\\openblas",
"CLBlast_DIR": "C:\\Users\\User\\Documents\\code\\vibe\\desktop\\src-tauri\\clblast",
"LIBCLANG_PATH": "C:\\Program Files\\LLVM\\bin"
}
While on Linux and macOS I have other paths. (In addition it will be nice if I can use {workspaceDirectory} env there? not sure if it will expand it)
The implementation should be similar to this per: https://github.com/rust-lang/rust-analyzer/pull/15308/files
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the rust-analyzer.cargo.extraEnv setting and the referenced pull request (rust-lang/rust-analyzer#15308) to understand the existing configuration pattern. Define the platform-specific environment configuration and determine whether {workspaceDirectory} expansion is supported; done means separate Windows, Linux, and macOS values work as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100