Module driver

Source
Expand description

Run the rustc compiler with our custom options and hooks.

Structsยง

CharonCallbacks
The callbacks for Charon
RunCompilerNormallyCallbacks
Dummy callbacks used to run the compiler normally when we shouldnโ€™t be analyzing the crate.

Staticsยง

SKIP_BORROWCK ๐Ÿ”’

Functionsยง

arg_values ๐Ÿ”’
Returns the values of the command-line options that match find_arg. The options are built-in to be of the form --arg=value or --arg value.
def_id_debug ๐Ÿ”’
Custom DefId debug routine that doesnโ€™t print unstable values like ids and hashes.
run_compiler_with_callbacks ๐Ÿ”’
Helper that runs the compiler and catches its fatal errors.
run_rustc_driver
Run the rustc driver with our custom hooks. Returns None if the crate was not compiled with charon (e.g. because it was a dependency). Otherwise returns the translated crate, ready for post-processing transformations.
set_mir_options ๐Ÿ”’
Tweak options to get usable MIR even for foreign crates.
set_no_codegen ๐Ÿ”’
Donโ€™t even try to codegen. This avoids errors due to checking if the output filename is available (despite the fact that we wonโ€™t emit it because we stop compilation early).
set_skip_borrowck ๐Ÿ”’
setup_compiler ๐Ÿ”’
skip_borrowck_if_set ๐Ÿ”’