commit | 4aaa6de306f83ce366ab989f8413e29436ab0838 | [log] [tgz] |
---|---|---|
author | Daniel Wagner-Hall <dwagnerhall@apple.com> | Fri May 19 20:09:52 2023 +0200 |
committer | GitHub <noreply@github.com> | Fri May 19 11:09:52 2023 -0700 |
tree | 92d9ee3371205ee19bc98ed0e728151c09124a89 | |
parent | f1b19c394f3edffa041b88be1bc371950476d1d2 [diff] |
Allow specifying exec and target compatibility constraints (#1971) Extra target triples may only be appropriate for specific platforms (e.g. if you register a toolchain with the exec_triple `x86_64-unknown-linux-gnu` with an extra target triple of `x86_64-unknown-linux-musl`, you may want differing `target_compatible_with` values for each of those two target triples. This allows for specifying explicit `exec_compatible_with` lists per toolchain (which was already supported by `rust_toolchain_repository` just not proxied by `rust_repository_set`), and explicit `target_compatible_with` lists, both for the default triple and for extra ones. I'm not 100% sure on our pre-existing assumption that every toolchain supports compiling targeting its own exec platform, i.e. the '`[exec_triple]`' part of https://github.com/bazelbuild/rules_rust/blob/937e63399b111a6d7ee53b187e4d113300b089e9/rust/repositories.bzl#L845 but it _does_ generally hold, and supplying a way of removing that default assumption is definitely a separate PR for another day if it becomes relevant to anyone.
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.