Remove uses of `BAZEL_VERSION` for detection of pre-1.0 Bazel. (#508)

This PR removes:

* The special cases for pre-1.0 Bazel versions in `rustc.bzl`
* `BAZEL_VERSION` and `@ io_bazel_rules_rust_bazel_version`, which no longer have any references.
* `rust_workspace()` in `//:workspace.bzl`, which was obsolete due to no longer needing to define the Bazel version repository.

The remaining behavior of `rust_workspace()` was to define toolchains for Starlark unit testing, which are used by `rules_rust` itself but not necessary for downstream consumers. I moved that part to `//:WORKSPACE`.

For compatibility, I left the `rust_workspace()` symbol defined but empty (except for a warning message). It ought to be deleted in a future PR once users have removed it from their `WORKSPACE` files.

Fixes https://github.com/bazelbuild/rules_rust/issues/462
11 files changed
tree: 3b9af9641ccee5be137aada1b7d030e28b50c403
  1. .bazelci/
  2. bindgen/
  3. cargo/
  4. docs/
  5. examples/
  6. proto/
  7. rust/
  8. test/
  9. tools/
  10. util/
  11. wasm_bindgen/
  12. .bazelignore
  13. .gitignore
  14. AUTHORS
  15. BUILD
  16. CODEOWNERS
  17. CONTRIBUTING.md
  18. CONTRIBUTORS
  19. LICENSE.txt
  20. README.md
  21. WORKSPACE
  22. 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.

Please refer to the full documentation.