Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update StableMIR doc to reflect current status #132085

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

celinval
Copy link
Contributor

Update stable-mir documentation, since we no longer use git subtree, and we have 2 different crates.

We no longer use git subtree, and we have 2 different crates.
@rustbot
Copy link
Collaborator

rustbot commented Oct 24, 2024

r? @scottmcm

rustbot has assigned @scottmcm.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot
Copy link
Collaborator

rustbot commented Oct 24, 2024

This PR changes Stable MIR

cc @oli-obk, @celinval, @ouz-a

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 24, 2024
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits. Let me know if I misunderstood something, particularly in the "Stable MIR design" section.


Then open a PR against rustc just like a regular PR.
Our goal is to start publishing `stable_mir` into crates.io.
Until then, users will use this as any other rustc crate, via extern crate.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps mention that users need to install the rustc-dev component.

compiler/stable_mir/README.md Outdated Show resolved Hide resolved
compiler/stable_mir/README.md Outdated Show resolved Hide resolved

## Stable MIR Design

The stable-mir will follow a similar approach to proc-macro2. It’s
implementation will eventually be broken down into two main crates:
implementation is done using two main crates:

- `stable_mir`: Public crate, to be published on crates.io, which will contain
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- `stable_mir`: Public crate, to be published on crates.io, whics contains
the stable data structures and APIs to access them. It calls to `rustc_smir`.
- `rustc_smir`: This crate serves as `stable_mir`'s interface to the compiler.
It is responsible for gathering all the information requested, and converting
them to their stable data structures.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Github didn't allow me to rewrite this as an inline suggestion, but this section seems wrong. AFAICT, the rustc_smir crate is what does the conversion; hence it having all the .stable calls.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. Not for long though, but I'll update this to match the current state. Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I documented that we are in a transition period. Let me know if that makes sense.

@compiler-errors
Copy link
Member

Anyways r=me after tweaking unless you specifically want a review from scott

celinval and others added 2 commits October 24, 2024 16:12
Co-authored-by: Michael Goulet <michael@errs.io>
Clarify that the translation between unstable and stable items is currently done in the `rustc_smir` crate.
@celinval
Copy link
Contributor Author

@compiler-errors do you mind taking a quick look at the updated version? Thanks

@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 25, 2024

📌 Commit aa2f968 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 25, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 25, 2024
…kingjubilee

Rollup of 4 pull requests

Successful merges:

 - rust-lang#131457 (Expand `ptr::fn_addr_eq()` documentation.)
 - rust-lang#132085 (Update StableMIR doc to reflect current status)
 - rust-lang#132118 (Add support for `~const` item bounds)
 - rust-lang#132125 (coverage: Emit LLVM intrinsics using the normal helper method)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7782b0d into rust-lang:master Oct 25, 2024
6 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Oct 25, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 25, 2024
Rollup merge of rust-lang#132085 - celinval:update-smir-doc, r=compiler-errors

Update StableMIR doc to reflect current status

Update stable-mir documentation, since we no longer use git subtree, and we have 2 different crates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants