Added `rustfmt` rules and aspects. (#722)

* Added `rustfmt` rules and aspects

* Regenerate documentation

* Update rust/private/rustfmt.bzl

Co-authored-by: Daniel Wagner-Hall <dawagner@gmail.com>

* Update test/rustfmt/rustfmt_failure_test.sh

Co-authored-by: Daniel Wagner-Hall <dawagner@gmail.com>

* Update tools/rustfmt/srcs/main.rs

Co-authored-by: Daniel Wagner-Hall <dawagner@gmail.com>

* Created a helper function for parsing formattable srcs

* Regenerate documentation

* Remove `canonicalize`

* Combined `rustfmt_check_aspect` into `rustfmt_aspect`.

* Regenerate documentation

* Label fields should be public so they're usable outside of the crate.

* The `rustfmt` rule binaries can now take a list of targets

* Fixed missing configs

* Added a test rule and used a build setting to control the rustfmt config

* Regenerate documentation

* Updated function name

* Updated comment

* Updated rustmt query to be more broad

* Updated rustfmt manifest format

* Regenerate documentation

Co-authored-by: Daniel Wagner-Hall <dawagner@gmail.com>
28 files changed
tree: 4e38c480cc4530d44c0265d477ff70b55967283e
  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.