Skip to main content

validate

Function validate 

Source
pub fn validate(self_manifest: &str)
Expand description

Validate that the calling crate’s dependencies match a battery pack’s specs.

Call this from your battery pack’s validate() function, passing the embedded manifest string. This reads the user’s Cargo.toml via the runtime CARGO_MANIFEST_DIR env var (which, in build.rs, points to the user’s crate) and compares against the battery pack specs.

Emits cargo:warning messages for any drift. Never fails the build.