Skip to main content

Module capture

Module capture 

Source
Expand description

Runtime reader for the fingerprint.json embedded in the binary.

The companion build module (feature dependency-graph-build) writes fingerprint.json to $OUT_DIR at compile time. The downstream binary embeds it with:

const BUILD_TIME_FINGERPRINT: &str = include_str!(concat!(env!("OUT_DIR"), "/fingerprint.json"));

§Functions

§Concerns

  • The data is a read-only snapshot fixed at compile time. It reflects the build environment at the time of compilation, not the current runtime state.
  • The fingerprint resides as plain text in the binary’s read-only data section. It is neither encrypted nor obfuscated and is visible to anyone with access to the binary.

Structs§

BuildInfo
Build environment section.
BuildTimeFingerprintData
Parsed contents of fingerprint.json.
PackageInfo
Package identity section.

Enums§

CaptureError
Errors that can occur while reading a captured fingerprint.

Functions§

parse
Parse the embedded fingerprint JSON into a typed BuildTimeFingerprintData.

Attribute Macros§

dependencies
Embed and bind the build-time fingerprint.json in one expression.