diff --git a/README.md b/README.md index 39c6347..fb35a99 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Stable MIR Librarification Project Group +# Rustc Librarification Project Group (formerly Stable MIR) -Welcome to the repository for the Stable MIR Librarification Project Group! Our goal is to provide a stable +Welcome to the repository for the Rustc Librarification Project Group! Our goal is to provide a SemVer compliant API based on the rust compiler mid-level intermediate representation (MIR) that can be used as the foundation for development of tools that want to perform sophisticated analyses and make stronger guarantees about the behavior of Rust programs. +To avoid confusion, we have renamed our project and our crates to `rustc_public` to better reflect our goal of providing +a public, SemVer compliant interface rather than a completely stable API. + This is the repository we use to organise and document our work. -If you are wondering how to use Stable MIR in your project, please check out the [Getting Started][tutorial] chapter. +If you are wondering how to use rustc_public in your project, please check out the [Getting Started][tutorial] chapter. [gh-pages]: https://rust-lang.github.io/project-stable-mir diff --git a/book/book.toml b/book/book.toml index 5151850..095ad6b 100644 --- a/book/book.toml +++ b/book/book.toml @@ -1,5 +1,5 @@ [book] -title = "Stable MIR Librarification Project" +title = "Rustc Librarification Project (formerly Stable MIR)" language = "en" [output.html] diff --git a/book/src/getting-started.md b/book/src/getting-started.md index 5d0750c..f0a918b 100644 --- a/book/src/getting-started.md +++ b/book/src/getting-started.md @@ -1,8 +1,8 @@ # Getting Started -The StableMIR APIs are currently exposed as a crate in the compiler named `stable_mir`[^release]. -This crate includes the definition of structures and methods to be stabilized, -which are expected to become the stable APIs in the compiler. +The supported APIs are currently exposed as a crate in the compiler named `rustc_public`[^release]. +This crate includes the definition of structures and methods to provide a SemVer compliant interface, +which are expected to become the public APIs in the compiler. These APIs were designed to provide information about a Rust crate, including the body of functions, as well as type and layout information. @@ -17,13 +17,13 @@ This chapter has two sections directed at different use cases. We also include a [Tips and Tricks](./tricks.md) section that is related to a few common obstacles tool writers encounter, -that is not directly related to the `stable_mir` crate and APIs. +that is not directly related to the `rustc_public` crate and APIs. Our repository also includes a little [demo crate](https://github.com/rust-lang/project-stable-mir/tree/main/demo) that -demonstrate how `stable_mir` crate can be used to analyze the main function of a crate. +demonstrate how `rustc_public` crate can be used to analyze the main function of a crate. The latest crate documentation can be found in the -[nightly documentation here](https://doc.rust-lang.org/nightly/nightly-rustc/stable_mir/index.html) +[nightly documentation here](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_public/index.html) -[^release]: We are planning to release the `stable_mir` crate into crates.io in the near future. +[^release]: We are planning to release the `rustc_public` crate into crates.io in the near future. See issue [#0030](https://github.com/rust-lang/project-stable-mir/issues/30) for the current release status. diff --git a/book/src/initial.md b/book/src/initial.md index 75c210f..145cf11 100644 --- a/book/src/initial.md +++ b/book/src/initial.md @@ -110,4 +110,4 @@ TODO TODO -[`demo/`](https://github.com/rust-lang/project-stable-mir/tree/main/demo) \ No newline at end of file +[`demo/`](https://github.com/rust-lang/project-stable-mir/tree/main/demo) diff --git a/rustc_public/README.md b/rustc_public/README.md index ab2546e..b566de5 100644 --- a/rustc_public/README.md +++ b/rustc_public/README.md @@ -1,8 +1,8 @@ This crate is currently developed in-tree together with the compiler. -Our goal is to start publishing `stable_mir` into crates.io. +Our goal is to start publishing `rustc_public` into crates.io. Until then, users will use this as any other rustc crate, by installing -the rustup component `rustc-dev`, and declaring `stable-mir` as an external crate. +the rustup component `rustc-dev`, and declaring `rustc-public` as an external crate. See the StableMIR ["Getting Started"](https://rust-lang.github.io/project-stable-mir/getting-started.html) guide for more information. @@ -12,34 +12,31 @@ guide for more information. The stable-mir will follow a similar approach to proc-macro2. Its implementation is split between two main crates: -- `stable_mir`: Public crate, to be published on crates.io, which will contain -the stable data structure as well as calls to `rustc_smir` APIs. The -translation between stable and internal constructs will also be done in this crate, -however, this is currently implemented in the `rustc_smir` crate.[^translation]. -- `rustc_smir`: This crate implements the public APIs to the compiler. +- `rustc_public`: Public crate, to be published on crates.io, which will contain +the stable data structure as well as calls to `rustc_public_bridge` APIs. The +translation between stable and internal constructs is also done in this crate. +- `rustc_public_bridge`: This crate implements the public APIs to the compiler. It is responsible for gathering all the information requested, and providing the data in its unstable form. -[^translation]: This is currently implemented in the `rustc_smir` crate, -but we are working to change that. - I.e., -tools will depend on `stable_mir` crate, -which will invoke the compiler using APIs defined in `rustc_smir`. +tools will depend on `rustc_public` crate, +which will invoke the compiler using APIs defined in `rustc_public_bridge`. I.e.: ``` - ┌──────────────────────────────────┐ ┌──────────────────────────────────┐ - │ External Tool ┌──────────┐ │ │ ┌──────────┐ Rust Compiler │ - │ │ │ │ │ │ │ │ - │ │stable_mir| │ │ │rustc_smir│ │ - │ │ │ ├──────────►| │ │ │ - │ │ │ │◄──────────┤ │ │ │ - │ │ │ │ │ │ │ │ - │ │ │ │ │ │ │ │ - │ └──────────┘ │ │ └──────────┘ │ - └──────────────────────────────────┘ └──────────────────────────────────┘ + ┌────────────────────────────┐ ┌───────────────────────────┐ + │ External Tool │ │ Rust Compiler │ + │ ┌────────────┐ │ │ ┌────────┐ │ + │ │ │ │ │ │ │ │ + │ │rustc_public│ │ │ │rustc │ │ + │ │ │ ├──────────►| │public │ │ + │ │ │ │◄──────────┤ │bridge │ │ + │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ + │ └────────────┘ │ │ └────────┘ │ + └────────────────────────────┘ └───────────────────────────┘ ``` More details can be found here: