Commit 86d809e
authored
fix: Return repo_metadata from repository rules in rust/repositories.bzl (#3855)
This allows repos produced by `rust_toolchain_tools_repository` to use
the remote repo content cache.
Using Bazel 9.0.0 and the remote repo content cache, the external
directory in the output base is much smaller when using this patch.
Downloading the toolchain, which comes in at almost 800 MB, can be
entirely skipped when using remote execution.
Before:
```shell
external # du -h -d1 | sort -h | grep rules_rust
<SNIP>
4.0K ./rules_rust++i+rules_rust_tinyjson
32K ./rules_rust++rust+rust_toolchains
196K ./rules_rust_prost+
6.1M ./rules_rust+
787M ./rules_rust++rust+rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools
```
After:
```shell
external # du -h -d1 | sort -h | grep rules_rust
<SNIP>
4.0K ./rules_rust++i+rules_rust_tinyjson
4.0K ./rules_rust++rust+rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools
32K ./rules_rust++rust+rust_toolchains
196K ./rules_rust_prost+
6.1M ./rules_rust+
```1 parent 42b098b commit 86d809e
1 file changed
Lines changed: 27 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
564 | 564 | | |
565 | 565 | | |
566 | 566 | | |
567 | | - | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
568 | 576 | | |
569 | 577 | | |
570 | 578 | | |
| |||
834 | 842 | | |
835 | 843 | | |
836 | 844 | | |
837 | | - | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
838 | 854 | | |
839 | 855 | | |
840 | 856 | | |
| |||
979 | 995 | | |
980 | 996 | | |
981 | 997 | | |
982 | | - | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
983 | 1007 | | |
984 | 1008 | | |
985 | 1009 | | |
| |||
0 commit comments