Expand description
mkit-core — BLAKE3 hashing and canonical v1 object byte format.
The byte layout implemented here is defined, normatively, in
docs/SPEC-OBJECTS.md (version 0x01, magic "MKT1"). Any change
to this crate MUST update the spec in the same PR.
The library depends on std to keep the code readable. No serde,
no anyhow, no panics on unchecked input.
Re-exports§
pub use sparse::MAX_FILTER_PATHS as SPARSE_MAX_FILTER_PATHS;pub use sparse::MAX_LEAVES as SPARSE_MAX_LEAVES;pub use sparse::SPARSE_CACHE_DIR;pub use sparse::SPARSE_CACHE_MAGIC;pub use sparse::SPARSE_CACHE_VERSION;pub use sparse::SPARSE_WIRE_MAGIC;pub use sparse::SPARSE_WIRE_MAX_BYTES;pub use sparse::SPARSE_WIRE_VERSION;pub use sparse::SparseError;pub use sparse::SparseManifest;pub use sparse::SparseProof;pub use sparse::SparseResponse;pub use sparse::SparseWireError;pub use sparse::build_sparse;pub use sparse::decode_sparse_cache;pub use sparse::decode_sparse_response;pub use sparse::encode_sparse_cache;pub use sparse::encode_sparse_response;pub use sparse::hash_filter;pub use sparse::verify_sparse;pub use hash::HASH_LEN;pub use hash::HEX_LEN;pub use hash::Hash;pub use hash::Hasher;pub use hash::to_hex;pub use hash::to_hex_bytes;pub use object::Blob;pub use object::ChunkedBlob;pub use object::Commit;pub use object::Delta;pub use object::EntryMode;pub use object::IDENTITY_MAX_LEN;pub use object::Identity;pub use object::IdentityKind;pub use object::MAGIC;pub use object::MkitError;pub use object::Object;pub use object::ObjectType;pub use object::Remix;pub use object::RemixSource;pub use object::SCHEMA_VERSION;pub use object::TAG_NAME_MAX_LEN;pub use object::Tag;pub use object::Tree;pub use object::TreeEntry;pub use serialize::deserialize;pub use serialize::serialize;pub use sign::COMMIT_DOMAIN;pub use sign::KeyPair;pub use sign::PublicKey;pub use sign::REMIX_DOMAIN;pub use sign::SecretSeed;pub use sign::Signature;pub use sign::TAG_DOMAIN;pub use sign::commit_signing_bytes;pub use sign::commit_signing_hash;pub use sign::remix_signing_bytes;pub use sign::remix_signing_hash;pub use sign::sign_commit;pub use sign::sign_remix;pub use sign::sign_tag;pub use sign::tag_signing_bytes;pub use sign::tag_signing_hash;pub use sign::verify;pub use sign::verify_commit;pub use sign::verify_remix;pub use sign::verify_tag;pub use store::MAX_RAW_OBJECT_SIZE;pub use store::MAX_TREE_DEPTH;pub use store::MKIT_DIR;pub use store::OBJECTS_DIR;pub use store::ObjectStore;pub use store::StoreError;pub use store::StoreResult;pub use chunker::AVG_SIZE as CHUNK_AVG_SIZE;pub use chunker::ChunkBoundary;pub use chunker::ChunkIterator;pub use chunker::FastCdc;pub use chunker::MASK_L as CHUNK_MASK_L;pub use chunker::MASK_S as CHUNK_MASK_S;pub use chunker::MAX_SIZE as CHUNK_MAX_SIZE;pub use chunker::MIN_SIZE as CHUNK_MIN_SIZE;pub use chunker::SEED as CHUNK_SEED;pub use chunker::chunk_boundaries;pub use chunker::gear_table_digest;pub use delta::HEADER_LEN as DELTA_HEADER_LEN;pub use delta::MAX_INSERT_LEN;pub use delta::OP_COPY;pub use delta::STREAM_VERSION;pub use pack::HEADER_LEN as PACK_HEADER_LEN;pub use pack::MAGIC as PACK_MAGIC;pub use pack::MAX_ENTRIES as PACK_MAX_ENTRIES;pub use pack::MAX_TOTAL_PAYLOAD as PACK_MAX_TOTAL_PAYLOAD;pub use pack::PackError;pub use pack::PackReader;pub use pack::PackWriter;pub use pack::TRAILER_LEN as PACK_TRAILER_LEN;pub use pack::UnpackReport;pub use pack::VERSION as PACK_VERSION;pub use pack::pack_key;pub use ignore::IgnoreError;pub use ignore::IgnoreList;pub use ignore::MAX_IGNORE_FILE_BYTES;pub use ignore::Pattern;pub use ignore::glob_match;pub use index::EntryStatus;pub use index::INDEX_FILE;pub use index::Index;pub use index::IndexEntry;pub use index::IndexError;pub use index::IndexResult;pub use index::MAGIC as INDEX_MAGIC;pub use index::MAX_INDEX_BYTES;pub use index::MAX_PATH_LEN;pub use index::validate_index_path;pub use refs::HEAD_FILE;pub use refs::HEADS_DIR;pub use refs::Head;pub use refs::REFS_DIR;pub use refs::Ref;pub use refs::RefError;pub use refs::RefResult;pub use refs::RefWriteCondition;pub use refs::SHALLOW_FILE;pub use refs::TAGS_DIR;pub use refs::decode_ref_wire;pub use refs::encode_ref_wire;pub use refs::validate_ref_name;pub use refs::validate_ref_prefix;pub use repo_lock::DEFAULT_TIMEOUT as LOCK_DEFAULT_TIMEOUT;pub use repo_lock::LockError;pub use repo_lock::LockResult;pub use repo_lock::RepoLock;pub use worktree::CHUNK_THRESHOLD;pub use worktree::MAX_FILE_BYTES;pub use worktree::WorktreeError;pub use worktree::WorktreeResult;pub use worktree::read_blob;pub use worktree::store_file_object;pub use worktree::validate_symlink_target;pub use protocol::BACKOFF_CAP;pub use protocol::BACKOFF_INITIAL;pub use protocol::BACKOFF_MAX_ATTEMPTS;pub use protocol::BackoffIterator;pub use protocol::PackKey;pub use protocol::Transport;pub use protocol::TransportError;pub use protocol::TransportResult;pub use protocol::is_retryable;pub use protocol::pack_key_from_hex;pub use ops::CherryPickError;pub use ops::CherryPickResult;pub use ops::Conflict;pub use ops::ConflictKind;pub use ops::DiffEntry;pub use ops::DiffError;pub use ops::DiffKind;pub use ops::DiffResult;pub use ops::MergeResult;pub use ops::StatusEntry;pub use ops::StatusStaging;pub use ops::cherry_pick;pub use ops::cherry_pick;pub use ops::collect_ancestor_set;pub use ops::diff_trees;pub use ops::find_merge_base;pub use ops::is_ancestor;pub use ops::merge_trees;pub use ops::status_diff;
Modules§
- batch
- Batched-durability object writes.
- chunker
FastCDCcontent-defined chunker.- delta
- Delta instruction stream — implements the versioned format required
by
docs/SPEC-DELTA.md. - hash
- BLAKE3 hashing helpers.
- history
- Append-only commit-history Merkle Mountain Range (MMR).
- ignore
.mkitignore/.gitignoreglob patterns.- index
- Staging-area index.
- object
- mkit object types.
- ops
mkit_core::ops— high-level history operations on top of the content-addressed object store.- pack
- Packfile writer / reader — conformant to
docs/SPEC-PACKFILE.md. - pack_
shard - Erasure-coded pack delivery via Reed-Solomon shards.
- protocol
- Cross-transport types: error taxonomy, the
Transporttrait, thePackKeydigest wrapper, and the retry/backoff helpers used by every transport implementation (memory, file, HTTP, S3, SSH). - refs
- Refs subsystem.
- repo_
lock - Repo-level lockfile helper (named
repo_lockto avoid collision withstd::sync::*Lock). - serialize
- Canonical byte (de)serialization for
Object. - sign
- Ed25519 commit / remix signing.
- sparse
- Verifiable sparse-checkout (Phase 1 scaffold).
- store
- Local content-addressed object store.
- worktree
- Worktree → tree-object builder.