rust-lang / rust-lang/rustc_public
Abi enum is not very "stable"
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
We have this huge enum that exhaustively encodes all ABIs that Rust somehow (unstably or stably) supports. Any new ABI that gets added, will be a SMIR breaking change, even if no one really cares about more than like 3 specific ones.
We could do one of the following:
- make the enum non-exhaustive, thus making adding new variants easy, and removing variants will just leave an unused variant around (that we could deprecate)
- replace the enum by a
struct Abi { name: String, unwind: bool }that can't be matched on exhaustively, and needs string matching. - do the struct thing above, but still have an enum for the name that allows at least matching on stable ABIs like
RustandC.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the ABI enum in compiler/rustc_smir/src/stable_mir/ty.rs around line 154 and review how external tools consume it. Compare the proposed representations with the project's stability requirements; done means adding or removing ABI support no longer unnecessarily breaks SMIR while preserving the required matching behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100