Expand description
The WIP public interface to rustc internals.
For more information see https://github.com/rust-lang/project-stable-mir
§Note
This API is still completely unstable and subject to change.
This crate shall contain all type definitions and APIs that we expect third-party tools to invoke to interact with the compiler.
The goal is to eventually be published on crates.io.
Re-exports§
pub use crate::crate_def::CrateDef;
pub use crate::crate_def::CrateDefItems;
pub use crate::crate_def::CrateDefType;
pub use crate::crate_def::DefId;
pub use crate::error::*;
Modules§
- abi
- alloc 🔒
- Memory allocation implementation for rustc_public.
- compiler_
interface - Define the interface with the Rust compiler.
- crate_
def - Module that define a common trait for things that represent a crate definition, such as, a function, a trait, an enum, and any other definitions.
- error
- When things go wrong, we need some error handling. There are a few different types of errors in rustc_public:
- mir
- rustc_
internal - Export the rustc_internal APIs. Note that this module has no stability guarantees and it is not taken into account for semver. Module that implements the bridge between rustc_public’s IR and internal compiler MIR.
- target
- Provide information about the machine that this is being compiled into.
- ty
- unstable 🔒
- Module that collects the things that have no stability guarantees.
- visitor
Macros§
- bridge_
impl 🔒 - run
- Instantiate and run the compiler with the provided arguments and callback.
- run_
with_ tcx - Instantiate and run the compiler with the provided arguments and callback.
Structs§
- Crate
- Holds information about a crate.
- Crate
Item - Holds information about an item in a crate.
- Opaque
- A type that provides internal information but that can still be used for debug purpose.
Enums§
Functions§
- all_
local_ items - Retrieve all items in the local crate that have a MIR associated with them.
- all_
trait_ decls - all_
trait_ impls - entry_
fn - Return the function where execution starts if the current
crate defines that. This is usually
main
, but could bestart
if the crate is a no-std crate. - external_
crates - Try to find a crate with the given name.
- find_
crates - Try to find a crate or crates if multiple crates exist from given name.
- local_
crate - Access to the local crate.
- opaque
Type Aliases§
- Assoc
Items - A list of associated items.
- Crate
Items - A list of crate items.
- Crate
Num - The number that identifies a crate.
- Filename
- Impl
Trait Decls - A list of impl trait decls.
- Symbol
- Use String for now but we should replace it.
- Trait
Decls - A list of trait decls.