Introduce rules_rust_unsupported_feature (#2511)

Add a special sentinel feature name to the UNSUPPORTED_FEATURES list.
This feature name can be used by authors of C++ toolchain configurations
to house any configuration fragments (e.g., linker flags) that should
NOT be applied when linking Rust targets.

The specific motivation for this is that I'm working on a project that
includes `-fsanitize=address` in its clang configuration. This needs to
be disabled when linking Rust.

I tried the more straightforward approach of adding the `features`
attribute to `rust_binary` targets in my repo, but this is not
sufficient: a `rust_binary` has implicit deps on targets like
@rules_rust//util/process_wrapper:bootstrap_process_wrapper.
1 file changed
tree: 9b7ffe4b3f7ba70fe5e3cc4cdfa3c7a6a2c3c589
  1. .bazelci/
  2. .bcr/
  3. .github/
  4. bindgen/
  5. cargo/
  6. crate_universe/
  7. docs/
  8. examples/
  9. ffi/
  10. nix/
  11. proto/
  12. rust/
  13. test/
  14. tools/
  15. util/
  16. wasm_bindgen/
  17. .bazelignore
  18. .bazelrc
  19. .clang-format
  20. .envrc
  21. .gitattributes
  22. .gitignore
  23. .prettierrc.toml
  24. .rustfmt.toml
  25. ARCHITECTURE.md
  26. AUTHORS
  27. BUILD.bazel
  28. CODEOWNERS
  29. COMPATIBILITY.md
  30. CONTRIBUTING.md
  31. CONTRIBUTORS
  32. LICENSE.txt
  33. MODULE.bazel
  34. README.md
  35. version.bzl
  36. WORKSPACE.bazel
README.md

Rust Rules

  • Postsubmit Build status

Overview

This repository provides rules for building Rust projects with Bazel.

Community

General discussions and announcements take place in the GitHub Discussions, but there are additional places where community members gather to discuss rules_rust.

Documentation

Please refer to the full documentation.