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

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
proc_macro_srvThe path to a rust_analyzer_proc_macro_srv binary.LabeloptionalNone
rust_analyzerThe path to a rust-analyzer binary.LabeloptionalNone
rustcThe path to a rustc binary.Labelrequired
rustc_srcsThe source code of rustc.Labelrequired
rustc_srcs_pathThe direct path to rustc srcs relative to rustc_srcs package root.Stringoptional"library"
versionThe 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'.Stringoptional""