Crate rustc_driver[−][src]

Expand description

The Rust compiler.

Note

This API is completely unstable and subject to change.

Re-exports

pub extern crate rustc_plugin_impl as plugin;

Modules

Contains infrastructure for configuring the compiler, including parsing command-line options.

JSON parsing and serialization

Finds crate binaries and loads their metadata

The various pretty-printing routines.

This module contains all the defined non-keyword Symbols.

Inspection and manipulation of the process’s environment.

Filesystem manipulation operations.

Traits, helpers, and type definitions for core I/O functionality.

Panic support in the standard library.

A module for working with processes.

Unicode string slices.

Macros

Derive macro generating an impl of the trait Default.

Inspects an environment variable at compile time.

Structs

Dump the save-analysis results to a file.

Specification of a single lint.

Identifies a lint known to the compiler.

Information about the registered lints.

This is the primary entry point for rustc.

CompilerCalls instance for a regular rustc build.

Represents the data associated with a compilation session for a single crate.

SyncLazyExperimental

A value which is initialized on the first access.

A process builder, providing fine-grained control over how a new process should be spawned.

A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.

A type that can represent owned, mutable platform-native strings, but is cheaply inter-convertible with Rust strings.

An owned, mutable path (akin to String).

Describes what to do with a standard I/O stream for a child process when passed to the stdin, stdout, and stderr methods of Command.

Enums

Whether to stop or continue compilation.

The type of diagnostics output to generate.

Differentiates between real files and common virtual files.

Parameter to control path trimming.

A clone-on-write smart pointer.

Constants

Exit status code used for compilation failures and invalid flags.

Exit status code used for successful compilation and help output.

Statics

Traits

An abstraction over the fs operations used by the Parser.

The backend’s way to give the crate store access to the metadata in a library. Note that it returns the raw metadata bytes stored in the library file, whether it is compressed, uncompressed, some weird mix, etc. rmeta files are backend independent and not handled here.

A trait for converting values to JSON

A trait for giving a type a useful default value.

The Read trait allows for reading bytes from a source.

A trait for objects which are byte-oriented sinks.

Functions

Runs a closure and catches unwinds triggered by fatal errors.

Variant of catch_fatal_errors for the interface::Result return type that also computes the exit code.

Write to stdout lint command options, together with a list of all available lints

Gets a list of extra command-line flags provided by the user, as strings.

Find a gated cfg determined by the predicate which is given the cfg’s name.

Get the codegen backend based on the name and specified sysroot.

Process command line options. Emits messages as appropriate. If compilation should continue, returns a getopts::Matches object parsed from args, otherwise returns None.

This allows tools to enable rust logging without having to magically match rustc’s tracing crate version. In contrast to init_rustc_env_logger it allows you to choose an env var other than RUSTC_LOG.

This allows tools to enable rust logging without having to magically match rustc’s tracing crate version.

Installs a panic hook that will print the ICE message on unexpected panics.

Prints the ICE message, including query stack, but without backtrace.

Prints version information

Invokes a closure, capturing the cause of an unwinding panic if one occurs.

Compares and returns the maximum of two values.

Type Definitions