Compiler in rustc_interface::interface - Rust (original) (raw)

pub struct Compiler {
    pub sess: Session,
    pub codegen_backend: Box<dyn CodegenBackend>,
    pub(crate) override_queries: Option<fn(&Session, &mut Providers)>,
    pub(crate) current_gcx: CurrentGcx,
    pub(crate) jobserver_proxy: Arc<Proxy>,
}

Expand description

Represents a compiler session. Note that every Compiler contains aSession, but Compiler also contains some things that cannot be inSession, due to Session being in a crate that has many fewer dependencies than this crate.

Can be used to run rustc_interface queries. Created by passing Config to run_compiler.

A reference to the current GlobalCtxt which we pass on to GlobalCtxt.

A jobserver reference which we pass on to GlobalCtxt.

§

§

§

§

§

§

§

§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 6632 bytes