bazelbuild / rules_rust

Rust rules for Bazel
https://bazelbuild.github.io/rules_rust/
Apache License 2.0
670 stars 433 forks source link

Update crate_universe to determine dep+feature trees per host #2877

Closed UebelAndre closed 2 months ago

UebelAndre commented 2 months ago

This change expands the use of cargo tree to resolve features for different combinations of host -> target platform triples where before cargo-bazel was only capable of resolving host dependencies for the current host platform and not a foreign platform.

A lengthy description of how this was done can be found at crate_universe/src/metadata/cargo_tree_resolver.rs - TreeResolver::create_rustc_wrapper.

closes https://github.com/bazelbuild/rules_rust/issues/2212