Skip to main content

Crate mkit_git_bridge

Crate mkit_git_bridge 

Source
Expand description

Deterministic mkit↔git bridge translation core.

Implements SPEC-GIT-BRIDGE: every mkit v1 object maps to a git object whose bytes are a pure function of the source bytes, with mkit-only fields carried in mkit-* commit/tag headers so the original object — and its Ed25519 signature — can be reconstructed and re-verified.

Export (translate) is specified by SPEC-GIT-BRIDGE; import is specified by SPEC-GIT-IMPORT. The reconstruct module is the export mapping’s verification-grade inverse, not an import path: it is defined only on objects translate can emit and fails loudly on anything else.

The blake3↔sha1 mapping (map) is always a rebuildable cache — determinism means deleting it and re-deriving yields identical results, so it is never a source of truth.

Re-exports§

pub use error::BridgeError;
pub use error::Refusal;
pub use gitobj::GitObject;
pub use gitobj::GitType;
pub use gitobj::Sha1Id;
pub use translate::ObjectSource;
pub use translate::TranslationBatch;
pub use translate::translate_closure;

Modules§

author
Author/committer/tagger line synthesis (SPEC-GIT-BRIDGE §6.2).
error
Bridge error taxonomy.
gitobj
git object encoding: SHA1("<type> <len>\0" || body) ids and zlib loose-object storage (SPEC-GIT-BRIDGE §2).
gitparse
Tolerant parsers for ARBITRARY git object bytes (SPEC-GIT-IMPORT §2, §3).
gitsrc
Reading objects out of a local git repository (SPEC-GIT-IMPORT §2): one long-lived git cat-file --batch child for object bytes, plus rev-list / ls-refs / config plumbing.
headers
mkit-* header names and value encodings (SPEC-GIT-BRIDGE §6, §7).
import
The git→mkit import driver (SPEC-GIT-IMPORT §3).
map
blake3↔sha1 mapping cache and per-remote export state (SPEC-GIT-BRIDGE §12.3).
reconstruct
Verification-grade inverse of crate::translate (SPEC-GIT-BRIDGE §9).
refname
git-side ref-name legality on top of the mkit grammar (SPEC-GIT-BRIDGE §12.1).
remoteid
Canonical remote identity (SPEC-GIT-IMPORT §8).
translate
mkit→git object translation (SPEC-GIT-BRIDGE §3–§8).
verify
Shallow signature verification (SPEC-GIT-BRIDGE §10).