Expand description
This module defines a generic file format that allows to check if a given file generated by incremental compilation was generated by a compatible compiler version. This file format is used for the on-disk version of the dependency graph and the exported metadata hashes.
In practice “compatible compiler version” means “exactly the same compiler version”, since the header encodes the git commit hash of the compiler. Since we can always just ignore the incremental compilation cache and compiler versions don’t change frequently for the typical user, being conservative here practically has no downside.
Structs§
- Open
File 🔒
Enums§
Constants§
- FILE_
MAGIC 🔒 - The first few bytes of files generated by incremental compilation.
- HEADER_
FORMAT_ 🔒VERSION - Change this if the header format changes.
Functions§
- open_
incremental_ 🔒file - Tries to open a file that was written by the previous incremental-compilation session, and checks that it was produced by a matching compiler version.
- report_
format_ 🔒mismatch - rustc_
version 🔒 - A version string that hopefully is always different for compiler versions with different encodings of incremental compilation artifacts. Contains the Git commit hash.
- save_in 🔒
- write_
file_ 🔒header