Crate re_build_tools
source Β·Expand description
This crate is to be used from build.rs
build scripts.
Modules§
- git πSituations to consider regarding git
- hashing π
- rebuild_detector π
Enums§
- Where is this
build.rs
build script running?
Constants§
- Should we export the build datetime for developers in the workspace?
- Should we export the current git hash/branch for developers in the workspace?
Statics§
- Atomic bool indicating whether or not to print the cargo build instructions
Functions§
- Returns info parsed from an invocation of the
cargo metadata
command. - 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 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.
- date_time πISO 8601 / RFC 3339 build time.
- Returns a list of all the enabled features of the given package.
- Call from the
build.rs
file of any crate you want to generate build info for. - Read the environment variable and trigger a rebuild whenever the environment variable changes.
- Get the current git branch name
- Get the full commit hash
- Get the first 7 characters of the commit hash
- Read the environment variable and trigger a rebuild whenever the environment variable changes.
- 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. - run_command π
- rust_llvm_versions πReturns
(rustc, LLVM)
versions. - set_env π
- Change whether or not this library should output cargo build instructions
- Helper to check whether or not cargo build instructions should be printed.
- Writes
content
to a file iff it differs from whatβs already there. - Writes the given
hash
at the specifiedpath
.