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