fidius-core::hash Rust¶
FNV-1a interface hashing for compile-time ABI drift detection.
The proc macro computes an interface_hash from the sorted required method
signatures of a trait. The host checks this hash at load time to reject
plugins compiled against a different interface.
Functions¶
fidius-core::hash::fnv1a¶
pub
Compute the FNV-1a 64-bit hash of a byte slice.
Source
fidius-core::hash::interface_hash¶
pub
Compute the interface hash from a set of method signatures.
Signatures are sorted lexicographically before hashing to ensure
order-independence. Each signature is joined with \n as a separator.
This function is not const because it allocates for sorting.
The proc macro calls this at compile time via a build-script-like pattern,
or uses fnv1a directly on pre-sorted, concatenated signatures.