Crate re_build_tools
source ·Expand description
This crate is to be used from build.rs
build scripts.
Use this crate together with the re_build_info
crate.
Functions
- Given a crate name, computes the sha256 hash of its source code (ordered by filename) and returns an hexadecimal string for it.
- Given a directory path, computes the sha256 hash of the accumulated contents of all of its files (ordered by filename) except those failing a a custom filter, and returns an hexadecimal string for it.
- Given a directory path, computes the sha256 hash of the accumulated contents of all of its files (ordered by filename), and returns an hexadecimal string for it.
- Given a file path, computes the sha256 hash of its contents and returns an hexadecimal string for it.
- Given a bunch of strings, computes the sha256 hash of their contents (in the order they were passed in) and returns an hexadecimal string for it.
- Call from the
build.rs
file of any crate you want to generate build info for. - Call from
build.rs
to trigger a rebuild whenever an environment variable changes. - Call from
build.rs
to trigger a rebuild whenever an environment variable changes, and returns true if that variable has been set to a truthy value. - Recursively walks the directory at
path
in filename order. - Reads back a versioning hash that was written with
write_versioning_hash
. - Call from
build.rs
to trigger a rebuild whenever any source file of the given package or any of its dependencies changes, recursively. - Call from
build.rs
to trigger a rebuild whenever the file atpath
changes. - Call from
build.rs
to trigger a rebuild whenever any of the files identified by the given globbedpath
change. - Call from
build.rs
to trigger a rebuild whenever the file atpath
changes, or it doesn’t exist. - Change whether or not this library should output cargo build instructions
- Writes
content
to a file iff it differs from what’s already there. - Writes the given
hash
at the specifiedpath
.