bindgen: don't `register_toolchains` in Bzlmod (#3231) I'm currently in the process of getting rules_ros2 onto Bzlmod. One challenge is that its rust support requires rules_rust_bindgen, which depends on llvm-project, which takes more than GitHub Action's maximum configurable job timeout (10h) to build. See https://github.com/mvukov/rules_ros2/pull/238#discussion_r1929687153 This PR adds new "bring your own clang" build flags: `--@rules_rust_bindgen//:clang` and `--@rules_rust_bindgen//:libclang`. As the added test shows, you can point these at toolchains_llvm's pre-compiled clang. The fancy !!set and << merge key yaml magic is documented in https://github.com/bazelbuild/continuous-integration/tree/master?tab=readme-ov-file#sharing-configuration-between-tasks Let me know what you think about this. I'm also curious what's the rationale for depending on llvm-project instead of toolchains_llvm in the first place. Maybe instead of making this configurable (and thus adding complexity) rules_rust_bindgen could just be switched over to toolchains_llvm completely? --------- Co-authored-by: UebelAndre <github@uebelandre.com>
This repository provides rules for building Rust projects with Bazel.
General discussions and announcements take place in the GitHub Discussions, but there are additional places where community members gather to discuss rules_rust.
Please refer to the full documentation.