Skip to main content

Module store

Module store 

Source
Expand description

BlueprintStore — the Blueprint VCS abstraction.

The interface (the BlueprintStore trait) does not leak Git concepts (commit / tree / refs). BlueprintVersion is abstracted as a ContentHash (blake3), leaving room to pick between Git2, InMemory, and future File / Remote / Lua backends.

Current scope:

  • Git2BlueprintStore (Layout::Single).
  • InMemoryBlueprintStore (for tests).
  • Canonical form = serde_yaml::to_string — the definitive form.
  • ContentHash = blake3(canonical bytes).

Re-exports§

pub use types::BlueprintEpoch;
pub use types::BlueprintId;
pub use types::BlueprintStoreError;
pub use types::BlueprintVersion;
pub use types::CommitMetadata;
pub use types::ContentHash;
pub use types::Trace;
pub use types::TraceOrigin;
pub use types::TraceRef;
pub use types::Traced;
pub use git2_store::Git2BlueprintStore;
pub use inmemory::InMemoryBlueprintStore;

Modules§

git2_store
Git2BlueprintStore — the git2-rs backend, one repo per id.
inmemory
InMemoryBlueprintStore — an in-memory backend used in tests.
types
Type definitions for BlueprintStore.

Traits§

BlueprintStore
The Blueprint-VCS abstract interface. Backed by Git2, InMemory, Remote, and so on.

Functions§

blueprint_content_hash
Compute the Blueprint’s ContentHashblake3 of the canonical YAML bytes.
blueprint_version
Compute the Blueprint’s BlueprintVersion — a newtype wrapper around ContentHash.
canonical_yaml
Serialise a Blueprint to canonical YAML bytes — the definitive form. The same output feeds both the ContentHash computation and the Git commit blob.