git-storage-trait 0.1.0

The backend-neutral git-storage contract — `GitOps` and its value types — that znippy-plugin-git (Arrow-IPC) and storage-git-gix (gix) both implement. Extracted from znippy-plugin-git so a gix backend can implement the same contract without linking Arrow or OpenZL.
Documentation
  • Coverage
  • 80.87%
    93 out of 115 items documented0 out of 58 items with examples
  • Size
  • Source code size: 47.26 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.27 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Ignalina

The git-storage contract: GitOps, the backend-neutral eleven.

This is the contract written into znippy-plugin-git's store.rs ("The twelve functions. Nothing else is permitted here."), lifted out so it is no longer owned by one implementation. It defines what a git object+ref store must be able to do, and names no storage, no index, no durability mechanism and no codec — so both backends implement the same trait:

implementer where how it stores
znippy-plugin-git plugins/native/znippy-plugin-git (this repo) Arrow-IPC in a znippy archive (OpenZL)
storage-git-gix edda/crates/storage-git-gix gix-odb / gix-ref on a filesystem

Why this crate is tiny, and must stay that way

It depends on anyhow and nothing else. That is load-bearing: the gix backend must be able to implement this contract without linking Arrow or OpenZL's C++ toolchain, and the znippy backend must not have to link gix. A dependency added here is a dependency forced on both.

"Eleven", not "twelve" — where seal() went

The original GitOps in znippy had a twelfth method, seal() -> Vec<ReservedSection>, that folds the live logs into the reserved Arrow sections a znippy archive carries. ReservedSection is an Arrow type (RecordBatch payloads); a gix backend has no such sections and no analog. So seal() is an implementation detail of the znippy backend, not part of the neutral contract — it stays an inherent method on GitStore, which is how gunnar already calls it (on the concrete store, never through this trait). Keeping it here would have forced Arrow onto the gix backend for a method it can never implement.