|
1 | 1 | This crate is currently developed in-tree together with the compiler.
|
2 | 2 |
|
3 | 3 | Our goal is to start publishing `stable_mir` into crates.io.
|
4 |
| -Until then, users will use this as any other rustc crate, via extern crate. |
| 4 | +Until then, users will use this as any other rustc crate, by installing |
| 5 | +the rustup component `rustc-dev`, and declaring `stable-mir` as an external crate. |
| 6 | + |
| 7 | +See the StableMIR ["Getting Started"](https://rust-lang.github.io/project-stable-mir/getting-started.html) |
| 8 | +guide for more information. |
5 | 9 |
|
6 | 10 | ## Stable MIR Design
|
7 | 11 |
|
8 | 12 | The stable-mir will follow a similar approach to proc-macro2. Its
|
9 | 13 | implementation is split between two main crates:
|
10 | 14 |
|
11 | 15 | - `stable_mir`: Public crate, to be published on crates.io, which will contain
|
12 |
| -the stable data structure as well as calls to `rustc_smir` APIs and |
13 |
| -translation between stable and internal constructs. |
| 16 | +the stable data structure as well as calls to `rustc_smir` APIs. The |
| 17 | +translation between stable and internal constructs will also be done in this crate, |
| 18 | +however, this is currently implemented in the `rustc_smir` crate.[^translation]. |
14 | 19 | - `rustc_smir`: This crate implements the public APIs to the compiler.
|
15 | 20 | It is responsible for gathering all the information requested, and providing
|
16 | 21 | the data in its unstable form.
|
17 | 22 |
|
| 23 | +[^translation]: This is currently implemented in the `rustc_smir` crate, |
| 24 | +but we are working to change that. |
| 25 | + |
18 | 26 | I.e.,
|
19 | 27 | tools will depend on `stable_mir` crate,
|
20 | 28 | which will invoke the compiler using APIs defined in `rustc_smir`.
|
|
0 commit comments