re_build_tools

Function compute_crate_hash

Source
pub fn compute_crate_hash(pkg_name: impl AsRef<str>) -> String
Expand description

Given a crate name, computes the sha256 hash of its source code (ordered by filename) and returns an hexadecimal string for it.

This includes the source code of all its direct and indirect dependencies.

This will automatically emit a rerun-if-changed clause for all the files that were hashed.