rust_analyzer_toolchain.bzl
rust_analyzer_toolchain
load("@rules_rust//rust:rust_analyzer_toolchain.bzl", "rust_analyzer_toolchain")
rust_analyzer_toolchain(name, proc_macro_srv, rust_analyzer, rustc, rustc_srcs, rustc_srcs_path,
version)
A toolchain for rust-analyzer.
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| proc_macro_srv | The path to a rust_analyzer_proc_macro_srv binary. | Label | optional | None |
| rust_analyzer | The path to a rust-analyzer binary. | Label | optional | None |
| rustc | The path to a rustc binary. | Label | required | |
| rustc_srcs | The source code of rustc. | Label | required | |
| rustc_srcs_path | The direct path to rustc srcs relative to rustc_srcs package root. | String | optional | "library" |
| version | The rust-analyzer version (e.g. 1.96.0). Optional. When set, consumers (e.g. the discover binary) can gate newer rust-analyzer features that older versions reject. Left empty for user-supplied toolchains where the version isn't known statically; consumers should treat the empty value as 'assume oldest supported'. | String | optional | "" |