Crate rustc_driver[][src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

The Rust compiler.

Note

This API is completely unstable and subject to change.

Modules

derive_registrar [
Experimental
]
driver [
Experimental
]
pretty [
Experimental
]

The various pretty print routines.

profile [
Experimental
]
target_features [
Experimental
]

Structs

CompilationFailure [
Experimental
]
RustcDefaultCalls [
Experimental
]

CompilerCalls instance for a regular rustc build.

Enums

Compilation [
Experimental
]

Constants

BUG_REPORT_URL [
Experimental
]
EXIT_FAILURE [
Experimental
]

Exit status code used for compilation failures and invalid flags.

EXIT_SUCCESS [
Experimental
]

Exit status code used for successful compilation and help output.

ICE_REPORT_COMPILER_FLAGS [
Experimental
]
ICE_REPORT_COMPILER_FLAGS_EXCLUDE [
Experimental
]
ICE_REPORT_COMPILER_FLAGS_STRIP_VALUE [
Experimental
]

Traits

CompilerCalls [
Experimental
]

A trait for customising the compilation process. Offers a number of hooks for executing custom code or customising input.

Functions

abort_on_err [
Experimental
]
commit_date_str [
Experimental
]

Returns the "commit date" of HEAD of the Git repo from which rustc was built as a static string.

commit_hash_str [
Experimental
]

Returns the full SHA1 hash of HEAD of the Git repo from which rustc was built.

describe_codegen_flags [
Experimental
]
describe_debug_flags [
Experimental
]
describe_lints [
Experimental
]
diagnostics_registry [
Experimental
]
enable_save_analysis [
Experimental
]
extra_compiler_flags [
Experimental
]

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

get_codegen_backend [
Experimental
]
get_codegen_sysroot [
Experimental
]
handle_explain [
Experimental
]
handle_options [
Experimental
]

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

in_named_rustc_thread [
Experimental
]

Runs f in a suitable thread for running rustc; returns a Result with either the return value of f or -- if a panic occurs -- the panic value.

in_rustc_thread [
Experimental
]

Runs f in a suitable thread for running rustc; returns a Result with either the return value of f or -- if a panic occurs -- the panic value.

init_rustc_env_logger [
Experimental
]

This allows tools to enable rust logging without having to magically match rustc's log crate version

load_backend_from_dylib [
Experimental
]
main [
Experimental
]
make_input [
Experimental
]
make_output [
Experimental
]
monitor [
Experimental
]

Run a procedure which will detect panics in the compiler and print nicer error messages rather than just failing the test.

parse_crate_attrs [
Experimental
]
parse_pretty [
Experimental
]
print_flag_list [
Experimental
]
print_wall_help [
Experimental
]
release_str [
Experimental
]

Returns a version string such as "0.12.0-dev".

run [
Experimental
]
run_compiler [
Experimental
]
run_compiler_with_pool [
Experimental
]
set_sigpipe_handler [
Experimental
]
show_content_with_pager [
Experimental
]
stdout_isatty [
Experimental
]
usage [
Experimental
]
version [
Experimental
]

Prints version information