rust/compiler/rustc_driver_impl
Stuart Cook 7ea3350902
Rollup merge of #140532 - celinval:chores-smir-ra, r=oli-obk
Fix RustAnalyzer discovery of rustc's `stable_mir` crate

This fixes issues with RustAnalyzer not finding `stable_mir` crate since RA discovery traverses the dependency graph of `rustc_driver` crate.

This change also aligns with the long term architecture plan for these crates, since we are moving towards having stable_mir depend on rustc_smir and not the other way around. See [this doc](https://hackmd.io/jBRkZLqAQL2EVgwIIeNMHg) for more details.

I believe a similar function will come handy eventually for `stable_mir` users, but I'm keeping it as part of `rustc_internal` since its current format initializes the StableMir context and requires `TyCtxt`.

Finally, I added the `rustc_internal` module re-export under a feature since the APIs from this module shall not be stabilized.
2025-05-06 16:28:41 +10:00
..
src Rollup merge of #140532 - celinval:chores-smir-ra, r=oli-obk 2025-05-06 16:28:41 +10:00
Cargo.toml Change rustc_driver dependency on stable_mir crate 2025-04-30 15:39:52 -07:00
messages.ftl Move some calls to before calling codegen_crate 2025-03-21 13:23:07 +00:00
README.md Update out-dated link 2024-10-06 18:08:28 +08:00

The driver crate is effectively the "main" function for the rust compiler. It orchestrates the compilation process and "knits together" the code from the other crates within rustc. This crate itself does not contain any of the "main logic" of the compiler (though it does have some code related to pretty printing or other minor compiler options).

For more information about how the driver works, see the rustc dev guide.