Content Identity and UUID Derivation (src/content.rs)

spacedrive · crates/store/src/content.rs · rust · Apache-2.0
files, database, security, lang:rust, tag:uuid

Derives content-addressed UUIDs from record bytes without coordination or clocks. Reuse when building decentralized storage or content-addressable file systems.

// Source: https://github.com/spacedriveapp/spacedrive | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
//! Content identity: the convergent uuid derived from a record's bytes.
//!
//! A record's identity is assigned at discovery and rebound by evidence. Its
//! content's identity is *derived*, so two machines that have never
//! communicated compute the same id for the same bytes, offline, retroactively,
//! with no coordination and no clock. That is what makes a content id an
//! address rather than a local handle, and it is the only rebind evidence that
//! survives crossing to another device: path is weak, and inode does not travel
//! at all.
//!
//! The hash is a ladder, so t

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key