Ask rust_toolchain for rustc_srcs in rust_analyzer.bzl (#733)

In this PR we remove hardcoded assumption about where rust-analyzer support code looks for rustc sources, and instead read that information from the `rust_toolchain.rustc_src`. We also handle the case when rustc sources are actually in the main repository, so there is no need to use the `__EXEC_ROOT__/` prefix for its path.
4 files changed
tree: a51f746c7b32659985a607c678587a4e5245e00e
  1. .bazelci/
  2. .github/
  3. bindgen/
  4. cargo/
  5. crate_universe/
  6. docs/
  7. examples/
  8. proto/
  9. rust/
  10. test/
  11. tools/
  12. util/
  13. wasm_bindgen/
  14. .bazelignore
  15. .gitignore
  16. ARCHITECTURE.md
  17. AUTHORS
  18. BUILD.bazel
  19. CODEOWNERS
  20. CONTRIBUTING.md
  21. CONTRIBUTORS
  22. LICENSE.txt
  23. README.md
  24. WORKSPACE.bazel
  25. workspace.bzl
README.md

Rust Rules

  • Postsubmit Build status
  • Postsubmit + Current Bazel Incompatible Flags Build status

Overview

This repository provides rules for building Rust projects with Bazel.

Community

Please refer to the full documentation.