Fix `rust_binary_without_process_wrapper` build with `--stamp` (#1473)

https://github.com/bazelbuild/rules_rust/pull/1452 set `rust_*.stamp=0` as a default for all rules except `rust_binary`, which has -1 as a default.

The `rust_binary_without_process_wrapper` rule is used to build the process wrapper itself. It needs to override the `stamp` attribute back to 0, as we do not support stamping without the process wrapper. https://github.com/bazelbuild/rules_rust/pull/1452 introduced a bug where the default value for this rule became `-1`, thus building `//util/process_wrapper` with `--stamp` is now broken.

This PR fixes the issue by routing all the attributes through the [_common_attrs_for_binary_without_process_wrapper](https://source.corp.google.com/piper///depot/google3/third_party/bazel_rules/rules_rust/rust/private/rust.bzl;rcl=461281665;l=1069?q=rust_binary_without_process_wrapper&ct=os&sq=package:piper%20file:%2F%2Fdepot%2Fgoogle3%20-file:google3%2Fexperimental) function, thus ensuring that the `stamp` attribute is once again set to 0.
2 files changed
tree: ae3c85a9e583e196a3050f14dd930033172d34d5
  1. .bazelci/
  2. .github/
  3. bindgen/
  4. cargo/
  5. crate_universe/
  6. distro/
  7. docs/
  8. examples/
  9. proto/
  10. rust/
  11. test/
  12. tools/
  13. util/
  14. wasm_bindgen/
  15. .bazelignore
  16. .bazelrc
  17. .clang-format
  18. .gitignore
  19. ARCHITECTURE.md
  20. AUTHORS
  21. BUILD.bazel
  22. CODEOWNERS
  23. COMPATIBILITY.md
  24. CONTRIBUTING.md
  25. CONTRIBUTORS
  26. LICENSE.txt
  27. README.md
  28. version.bzl
  29. WORKSPACE.bazel
  30. workspace.bzl
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.