plugins.rust-tools.server.cargo.buildScripts.enable

Run build scripts (build.rs) for more precise code analysis.

Type: null or boolean

Default: null

Plugin default: true

Declared by:

plugins.rust-tools.server.cargo.buildScripts.invocationStrategy

Specifies the invocation strategy to use when running the build scripts command. If per_workspace is set, the command will be executed for each Rust workspace with the workspace as the working directory. If once is set, the command will be executed once with the opened project as the working directory. This config only has an effect when #rust-analyzer.cargo.buildScripts.overrideCommand# is set.

Values:

  • per_workspace: The command will be executed for each Rust workspace with the workspace as the working directory.
  • once: The command will be executed once with the opened project as the working directory.

Type: null or one of “per_workspace”, “once”

Default: null

Plugin default: "per_workspace"

Declared by:

plugins.rust-tools.server.cargo.buildScripts.overrideCommand

Override the command rust-analyzer uses to run build scripts and build procedural macros. The command is required to output json and should therefore include --message-format=json or a similar option.

If there are multiple linked projects/workspaces, this command is invoked for each of them, with the working directory being the workspace root (i.e., the folder containing the Cargo.toml). This can be overwritten by changing #rust-analyzer.cargo.buildScripts.invocationStrategy#.

By default, a cargo invocation will be constructed for the configured targets and features, with the following base command line:

cargo check --quiet --workspace --message-format=json --all-targets --keep-going

.

Type: null or (list of string)

Default: null

Plugin default: null

Declared by:

plugins.rust-tools.server.cargo.buildScripts.rebuildOnSave

Rerun proc-macros building/build-scripts running when proc-macro or build-script sources change and are saved.

Type: null or boolean

Default: null

Plugin default: true

Declared by:

plugins.rust-tools.server.cargo.buildScripts.useRustcWrapper

Use RUSTC_WRAPPER=rust-analyzer when running build scripts to avoid checking unnecessary things.

Type: null or boolean

Default: null

Plugin default: true

Declared by: