Skip to main content

Module object

Module object 

Source
Expand description

mkit object types.

Spec reference: docs/SPEC-OBJECTS.md §1–§9. Briefly:

  • Every stored object begins with the 6-byte v1 prologue [u8 object_type][4B "MKT1"][u8 0x01].
  • Hashes are 32-byte BLAKE3.
  • Integers are little-endian. Timestamps are u64 (widened from u32 in the mkit-era).
  • Tree entry names are 1..=255 bytes, forbid \0 / \\ and the names . / .., and MUST be lex-sorted with no duplicates.
  • Identity is a tagged union [u8 kind][u16 LE len][payload]; len is 1..=IDENTITY_MAX_LEN, ed25519 MUST have len == 32.

Structs§

Blob
Blob: raw bytes, no interpretation. Max 1 GiB at the storage layer.
ChunkedBlob
Chunked-blob manifest. See SPEC-OBJECTS.md §7.
Commit
Commit object. See SPEC-OBJECTS.md §5.
Delta
Delta object (pack-only). See SPEC-OBJECTS.md §8.
Identity
Tagged-union identity. Owned bytes, cheap to clone — payload is at most IDENTITY_MAX_LEN = 4 KiB.
Remix
Remix object. See SPEC-OBJECTS.md §6.
RemixSource
Remix source provenance. upstream_id is opaque 32-byte caller- chosen content (e.g. BLAKE3(repo_url)); core never interprets it.
Tag
Annotated / signed tag object. See SPEC-OBJECTS.md §6a and SPEC-SIGNING.md §4a.
Tree
Tree: lex-sorted list of entries.
TreeEntry
A single entry in a Tree object.

Enums§

EntryMode
Tree entry mode (1 byte).
IdentityKind
Tagged-union author identity. See SPEC-OBJECTS.md §9.
MkitError
All decode / validation errors raised by the serialize module, plus a small number of construction-time errors.
Object
Unified object union.
ObjectType
Object type tag (1 byte, at offset 0 of the v1 prologue).

Constants§

IDENTITY_MAX_LEN
Upper bound on Identity payload length. Rejected at decode time as IdentityTooLarge for anything greater.
MAGIC
Fixed 4-byte magic at offset 1 of every v1 object.
SCHEMA_VERSION
Current (and only) v1 schema version byte.
TAG_NAME_MAX_LEN
Upper bound on a Tag name payload. Rejected at decode time as MkitError::TagNameInvalid for anything outside 1..=TAG_NAME_MAX_LEN.