Skip to main content

Module toolchain

Module toolchain 

Source

Structs§

Toolchain
ToolchainFile 🔒
This struct is used to deserialize the “rust-toolchain” file.

Constants§

CHARON_SYSROOT_VAR
The environment variable through which charon tells charon-driver which full-MIR sysroot to use, if any.

Statics§

PINNED_TOOLCHAIN 🔒

Functions§

driver_cmd
driver_path
get_pinned_toolchain 🔒
in_toolchain
Build a command that calls the given binary in the correct toolchain environment. This uses rustup to provide the correct toolchain, unless we’re in a nix context where the toolchain is already in PATH.
miri_sysroot_cache_dir 🔒
Where we tell cargo miri setup to build the sysroot for the current toolchain. We use a per-toolchain directory because Miri’s default cache directory (~/.cache/miri) is shared across all toolchains and gets overwritten when switching between Charon versions.
setup_miri_sysroot
cargo miri setup sets up a sysroot containing a standard library built with -Zalways-encode-mir.
sysroot_has_target 🔒
Whether this sysroot provides libraries for the given target.
toolchain_path
Get the path to the sysroot, where the cargo and rustc binaries can be found. Prefer using in_toolchain instead of this as much as possible.
toolchain_version