Skip to content

Add CPU constraints for common Rust platforms#134

Merged
Wyverald merged 1 commit intobazelbuild:mainfrom
UebelAndre:rust
May 1, 2026
Merged

Add CPU constraints for common Rust platforms#134
Wyverald merged 1 commit intobazelbuild:mainfrom
UebelAndre:rust

Conversation

@UebelAndre
Copy link
Copy Markdown
Contributor

@UebelAndre UebelAndre commented Apr 27, 2026

Added new CPU constraints covering architecture families from Rust's platform support that had no existing representation. These were selected from https://doc.rust-lang.org/nightly/rustc/platform-support.html based on requests I've seen for them either on slack or in https://github.com/bazelbuild/rules_rust

closes #131
closes #103
closes #99

@UebelAndre
Copy link
Copy Markdown
Contributor Author

cc @fmeum

@katre
Copy link
Copy Markdown
Contributor

katre commented Apr 30, 2026

Loongarch was added in #133, rebase and fix that.

@gregestren
Copy link
Copy Markdown
Collaborator

Any thoughts on this vs. https://github.com/bazel-contrib/platforms_contrib?

A lot of these look suitably generic but I know Rust has its own platform ecosystem which doesn't necessarily expand to other domains?

@UebelAndre
Copy link
Copy Markdown
Contributor Author

UebelAndre commented Apr 30, 2026

Any thoughts on this vs. https://github.com/bazel-contrib/platforms_contrib?

A lot of these look suitably generic but I know Rust has its own platform ecosystem which doesn't necessarily expand to other domains?

@gregestren I think all the ABI constraints should go in platforms_contrib but I would like to keep CPU in one place. I had reached out to @fmeum before opening this PR to get their opinion on exactly this and the conclusion was these should live here. There are obviously way more things (like GPU values) that arguably could go in either place but I explicitly opted to take what I thought was the most common of the missing CPU values from that page to have here. None of the CPUs are rust specific.

@UebelAndre
Copy link
Copy Markdown
Contributor Author

Loongarch was added in #133, rebase and fix that.

@katre Thank you so much!

@UebelAndre
Copy link
Copy Markdown
Contributor Author

@gregestren I am intentionally not trying to add anything Rust specific here. Rust just happened to be my motivation but if you looked at the page, there are like +100 values that I have not included since those would likely require deeper discussion and potentially increase the scope of this repo. Which I am trying not to do.

@Wyverald Wyverald merged commit 8a4b31a into bazelbuild:main May 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants