ZIm/crates/languages
Coenen Benjamin 65f76e6f4d
Add support for --target-dir for Rust tasks (#24725)
This PR is an attempt to add support for `--target-dir` argument to
`cargo` commands when executing tasks with rust.
When using VSCode I was already using this trick to not block the
current binary compilation when I was trying a specific test. As it's a
different target directory it won't block the `cargo` commands I'm using
in my terminal.

I used the task variables to achieve this but I'm not sure it's the best
option to be honest. I didn't find any examples in your docs to see if
sometimes you had specific configuration for languages and tasks.

Let me know if this solution would be a good fit and if the
implementation is ok.

If so feel free to redirect me to an example I can reproduce to write a
unit test or so... And I will also update the docs.

Example of config:

```
{
  "languages": {
    "Rust": {
      "tasks": {
        "variables": {
          "RUST_TARGET_DIR": ".cargo_check"
        }
      }
    }
  }
}
```

it will run `cargo test -p XXX --target-dir .cargo-check`


Release Notes:

- Added support for `--target-dir` for Rust tasks

---------

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
2025-02-23 11:05:07 +01:00
..
src Add support for --target-dir for Rust tasks (#24725) 2025-02-23 11:05:07 +01:00
Cargo.toml Sort Cargo.tomls (#24417) 2025-02-07 02:14:57 +00:00
LICENSE-GPL chore: Extract languages from zed crate (#8270) 2024-02-23 15:56:08 +01:00