Module cargo::core::compiler

source ·

Modules

BuildContext is a (mostly) static information about a build task.
build_plan 🔒
A graph-like structure used to represent the rustc commands to build the package and the interdependencies between them.
context 🔒
crate_type 🔒
Fingerprints
Support for future-incompatible warning reporting.
job 🔒
job_queue 🔒
This module implements the job queue which determines the ordering in which rustc is spawned off. It also manages the allocation of jobserver tokens to rustc beyond the implicit token each rustc owns (i.e., the ones used for parallel LLVM work and parallel rustc threads).
layout 🔒
Management of the directory layout of a build
links 🔒
lto 🔒
Module for generating dep-info files.
Utilities for building with rustdoc.
Code for building the standard library.
timings 🔒
Timing tracking.
unit 🔒
Constructs the dependency graph for compilation

Structs

Configuration information for a rustc build.
The build context, containing complete information needed for a build task before it gets started.
Contains the parsed output of a custom build script.
Map of packages to build script output.
Linking information for a Unit.
A structure returning the result of a compilation.
Abstraction for the representation of a compilation target that Cargo has.
Collection of all the stuff that is needed to perform a build.
A DefaultExecutor calls rustc without doing anything else. It is Cargo’s default behaviour.
Structure with enough information to run rustdoc --test.
Type of each file generated by a Unit.
The Metadata is a hash used to make unique file names for each unit in a build. It is also use for symbol mangling.
Structure used to deal with Rustdoc fingerprinting
Collection of information about rustc and the host and target.
Information about the platform target gleaned from querying rustc.
All information needed to define a unit.
A small structure used to “intern” Unit values.
Information about the output of a unit.

Enums

Indicator for how a unit is being compiled.
The general “mode” for what to do. This is used for two purposes. The commands themselves pass this in to compile_ws to tell it the general execution strategy. This influences the default targets selected. The other use is in the Unit struct to indicate what is being done with a specific target.
Kind of each file generated by a Unit, part of FileType.
Indication of the freshness of a package.
Possible ways to run rustc and request various parts of LTO.
Kinds of build timings we can output.

Constants

Traits

A glorified callback for executing calls to rustc. Rather than calling rustc directly, we’ll use an Executor, giving clients an opportunity to intercept the build calls.

Functions

Forward -Zallow-features if it is set for cargo.
Add custom flags from the output a of build-script to a ProcessBuilder
Add error-format flags to the command.
Generate the –check-cfg arguments for the unit
compile 🔒
envify 🔒
Generates a list of --extern arguments.
All active features for the unit passed as –cfg
Link the compiled target (often of form foo-{metadata_hash}) to the final target. This must happen during both “Fresh” and “Compile”.
lto_args 🔒
Generates the warning message used when fallible doc-scrape units fail, either for rustdoc or rustc.
Returns true if the line should be cached.
rustc 🔒
rustdoc 🔒