rules_rust
rules_rust copied to clipboard
Add `x86_64-unknown-none` as a Tier 2 target
As announced in rust-lang/rust#95705, x86_64-unknown-none
is now a Tier 2 target with distributed build artefacts. It would be great to be able to use this in extra_target_triples
in rust_register_toolchains
, but it's currently missing from some of the lists in rust/platform/tiple_mappings.bzl
.
Would it be possible to add this? I reckon it should take us a lot of the way to being able to cross-compile to x86_64-unknown-none
natively. I'm very happy to help out with testing if that would help. Many thanks.
What would this platform be represented as? The problem with some of the triples supported by rust is that some platforms are indistinguishable from others given the lack of constraints commonly available in Bazel (related to https://github.com/bazelbuild/platforms/issues/38). As long as the triple isn't going to conflict with another, I think it'd be fine to add.
Good question. I'll have a think about how you'd represent it.
Would the combination of cpu = "x86_64"
and os = "none"
work? Sorry if I've misunderstood the question.
Would the combination of
cpu = "x86_64"
andos = "none"
work? Sorry if I've misunderstood the question.
This sounds reasonable to me and that the combination of those constraints wouldn't match another platform triple. Seems like a reasonable addition to me. Do you want to open a pull request? I'd be happy to review 😄
I'm happy to try, but I'm not familiar with the code in rust/platform/triple_mappings.bzl so I'm not confident I'd make all the necessary changes.