diff options
| author | bors <bors@rust-lang.org> | 2023-07-28 07:03:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-07-28 07:03:09 +0000 |
| commit | bc1b0bfa7fd8188e207976485a841dc6c37b4f94 (patch) | |
| tree | da30a4ca923cb00a14d7be839c2d0060c28add23 /docs | |
| parent | b64e5b3919b24bc784f36248e6e1f921ee7bb71b (diff) | |
| parent | 08b3b2a56db77d56cdf0b6a8a23b8f93f92dae4f (diff) | |
| download | rust-bc1b0bfa7fd8188e207976485a841dc6c37b4f94.tar.gz rust-bc1b0bfa7fd8188e207976485a841dc6c37b4f94.zip | |
Auto merge of #15308 - vsrs:runnable_env_per_platform, r=HKalbasi
Runnable env per platform
This PR adds an option to specify runnables `env` per platform (win32, linux, etc.):
```
{
"rust-analyzer.runnables.extraEnv": [
{
"platform": "win32",
"env": {
"SCITER_BIN_FOLDER": "C:\\Projects\\3rd\\sciter-js-sdk\\bin\\windows\\x64",
}
},
{
"platform":["linux","darwin"],
"env": {
"SCITER_BIN_FOLDER": "/home/vit/Projects/sciter/sciter-js-sdk/bin/linux/x64",
}
}
]
}
```
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/user/manual.adoc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc index 2cf985adabc..5dafd1a4c8c 100644 --- a/docs/user/manual.adoc +++ b/docs/user/manual.adoc @@ -949,6 +949,29 @@ Or it is possible to specify vars more granularly: You can use any valid regular expression as a mask. Also note that a full runnable name is something like *run bin_or_example_name*, *test some::mod::test_name* or *test-mod some::mod*, so it is possible to distinguish binaries, single tests, and test modules with this masks: `"^run"`, `"^test "` (the trailing space matters!), and `"^test-mod"` respectively. +If needed, you can set different values for different platforms: +```jsonc +"rust-analyzer.runnables.extraEnv": [ + { + "platform": "win32", // windows only + env: { + "APP_DATA": "windows specific data" + } + }, + { + "platform": ["linux"], + "env": { + "APP_DATA": "linux data", + } + }, + { // for all platforms + "env": { + "APP_COMMON_DATA": "xxx", + } + } +] +``` + ==== Compiler feedback from external commands Instead of relying on the built-in `cargo check`, you can configure Code to run a command in the background and use the `$rustc-watch` problem matcher to generate inline error markers from its output. |
