Speedup manifest splicing by removing workspace discovery logic (#3570) The original implementation required users to specify all manifests belonging to the workspace, and had a validation pass that walked the repo to verify the list was in sync. This PR swaps that for a `cargo metadata` call, which lists the manifests making up the workspace. We can then call `ctx.watch` on them to invalidate the extension when they are modified (which was previously impossible if they were not passed to the extension as labels). This also means users only need to specify the workspace-root Cargo.toml now :) There is still an edge-case where a newly-added Cargo.toml won't trigger invalidation if it's covered by one of the wildcard `members` patterns, but that was already a pre-existing issue. In practice, we'd expect invalidation in that case to be triggered by a Cargo.lock change, or to be unnecessary if the crate does not add new deps to crate resolution. Fixes https://github.com/bazelbuild/rules_rust/issues/3425 Fixes https://github.com/bazelbuild/rules_rust/issues/3515 Fixes https://github.com/bazelbuild/rules_rust/issues/3518 Obsoletes https://github.com/bazelbuild/rules_rust/pull/3387 Co-authored-by: Daniel Wagner-Hall <dawagner@gmail.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.