commit | d0b0553aab85fee78027c39a1936f7324b11a82a | [log] [tgz] |
---|---|---|
author | Cornelius Riemenschneider <cornelius@github.com> | Fri Jun 14 10:45:12 2024 +0200 |
committer | GitHub <noreply@github.com> | Fri Jun 14 08:45:12 2024 +0000 |
tree | 3686852ade1608ccd74e2742c63b33da0e036df9 | |
parent | 67b3571d7e5e341de337317d84a6bec6b9d02ed7 [diff] |
`crate_universe`: Make module extension restarts less expensive. (#2691) This PR reduces the number of expensive module extension implementation restarts in combination with multiple `from_cargo` configurations. As each configuration processing calls `module_ctx.path` (which can and will cause restarts), we executed _generate_hub_and_spokes (i.e. `cargo-bazel`) _a lot_ and then threw that away on the next restart. Triggering `module_ctx.path` early is therefore a significant performance optimization. On our repository, this gives us a 10sec speedup on module extension processing (local M1 mac, nothing happening in parallel), see our [MODULE.bazel](https://github.com/github/codeql/blob/main/MODULE.bazel) if you're interested in what we're doing. This excessive restarting also exposed an upstream bazel bug on Windows 2019, where bazel spuriously fails to clean up the working directory (c.f. https://github.com/bazelbuild/bazel/issues/22710). Co-authored-by: Daniel Wagner-Hall <dwagnerhall@apple.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.