-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Conversation
We no longer use git subtree, and we have 2 different crates.
There was a problem hiding this 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.
compiler/stable_mir/README.md
Outdated
|
||
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. |
There was a problem hiding this comment.
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.
|
||
## 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Anyways r=me after tweaking unless you specifically want a review from scott |
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.
@compiler-errors do you mind taking a quick look at the updated version? Thanks |
@bors r+ rollup |
…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
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.
Update stable-mir documentation, since we no longer use git subtree, and we have 2 different crates.