Module rustc_smir::stable_mir
source · Expand description
Module that implements the public interface to the Stable MIR.
This module shall contain all type definitions and APIs that we expect 3P tools to invoke to interact with the compiler.
The goal is to eventually move this module to its own crate which shall be published on crates.io.
Note:
There shouldn’t be any direct references to internal compiler constructs in this module.
If you need an internal construct, consider using rustc_internal or rustc_smir.
Modules
Structs
- Holds information about a crate.
- Holds information about an item in the crate. For now, it only stores the item DefId. Use functions inside
rustc_internalmodule to use this item.
Statics
- TLV 🔒
Traits
Functions
- Retrieve all items in the local crate that have a MIR associated with them.
- Return the function where execution starts if the current crate defines that. This is usually
main, but could bestartif the crate is a no-std crate. - Try to find a crate with the given name.
- Try to find a crate with the given name.
- Access to the local crate.
- with 🔒Loads the current context and calls a function with it. Do not nest these, as that will ICE.
Type Definitions
- A list of crate items.
- The number that identifies a crate.
- A unique identification number for each item accessible for the current compilation unit.
- Use String for now but we should replace it.