Skip to main content

mkit_git_bridge/
lib.rs

1//! Deterministic mkit↔git bridge translation core.
2//!
3//! Implements [`SPEC-GIT-BRIDGE`](../../../docs/SPEC-GIT-BRIDGE.md):
4//! every mkit v1 object maps to a git object whose bytes are a pure
5//! function of the source bytes, with mkit-only fields carried in
6//! `mkit-*` commit/tag headers so the original object — and its
7//! Ed25519 signature — can be reconstructed and re-verified.
8//!
9//! Export ([`translate`]) is specified by SPEC-GIT-BRIDGE; import is
10//! specified by SPEC-GIT-IMPORT. The [`reconstruct`] module is the
11//! export mapping's verification-grade inverse, **not** an import
12//! path: it is defined only on objects [`translate`] can emit and
13//! fails loudly on anything else.
14//!
15//! The blake3↔sha1 mapping ([`map`]) is always a rebuildable cache —
16//! determinism means deleting it and re-deriving yields identical
17//! results, so it is never a source of truth.
18
19pub mod author;
20mod b64;
21pub mod error;
22pub mod gitobj;
23pub mod gitparse;
24pub mod gitsrc;
25pub mod headers;
26pub mod import;
27pub mod map;
28pub mod reconstruct;
29pub mod refname;
30pub mod remoteid;
31pub mod translate;
32pub mod verify;
33
34pub use error::{BridgeError, Refusal};
35pub use gitobj::{GitObject, GitType, Sha1Id};
36pub use translate::{ObjectSource, TranslationBatch, translate_closure};