StableMIR is being developed to become the public interface of the Rust compiler to analysis tools that can be developed outside of the Rust main repository.
It is intended to be more stable than the internal APIs, and to follow semantic versioning. For that, the goal is to start publishing a stable_mir crate on crates.io, which can be explicitly selected by tool developers.
This document proposes what the first releases will look like, as well as how development will be done in the Rust compiler in between version releases.
Context
In our first development phase of StableMIR, we focused on adding enough coverage for static analyzers tools to use in order to interpret a Rust program.
For that, we added two crates to the Rust compiler, stable_mir and rustc_smir, the first is a shallow shell that implements the public APIs while the second implements the interface between public APIs and the compiler internal APIs, including translation. Because of that, the rustc_smir crate depends on the stable_mir crate.