plugins/native/znippy-plugin-git/Cargo.toml
[package]
name = "znippy-plugin-git"
# 0.1.1: local source DRIFTED from the published 0.1.0 at the same version number.
# crates.io bytes are immutable, so the edit only reaches consumers as a new
# version. Bumped 2026-08-23 to unblock the release cascade — holger patches
# znippy to this checkout, which makes 19 holger crates unpublishable fork riders.
# 0.1.5 (2026-09-21, lane T8): the runtime doors a twin needs — `set_explode_default`,
# `set_explode_budget_default`, `set_resolve_workers_default`, `set_resolve_lookahead_default`,
# beside the `set_graph_cache_default` 0.1.3 added. gunnar's twin learns its role over gRPC at
# runtime and forbids the `unsafe` a `set_var` needs, so without these four the twin's memory
# bound could only be a kernel command line — which is a per-box parameter, which the owner
# ruling of 2026-09-21 (one medium, no twin ISO) forbids. gunnar pins this version in
# crates/gunnar-server/Cargo.toml and crates/gunnar-cli/Cargo.toml.
# 0.2.1 (2026-10-28, FORGE-SHALLOW): a header probe is clamped at the archive end, so a short thin
# ref-delta that is the archive's last entry no longer fails header() with a short read
# (git.gunnar.rs: every shallow clone of edda after fcb2292). gunnar takes it by `cargo update`.
# 0.2.2 (2026-10-31, gunguard): every Arrow IPC read (graph, reach, sealed push-log
# sections, push-log frames, the archive journal, the persisted index, the exploded
# table) goes through znippy-common's ipc_guard, so hostile bytes are an Err and never
# an arrow-ipc panic or allocation abort; read_journal no longer indexes unchecked
# columns. Needs znippy-common 0.10.5 (check_batches_after_schema).
# 0.2.3 (2026-10-31, gitidx, GUN-PERF-ZNIPPY): the reachability index in integers end to end
# (no hex on a serving path, a 16-bit fanout on the oid space), an append-only ordinal space
# (a push never renumbers a bitmap), git's skip-rule builder behind a bounded delta-chain memo
# (git.git: 151 s -> 21 s), the table extended in the fold for pushed tips (first select after a
# push 121 s -> 0.05 s) and persisted as objects.reach through the ipc_guard (restart 104 s ->
# 0.3 s); select answers a clone of git.git in 25 ms (was 83 s); refs() is one pass under the
# lock; the persisted graph's token is checked before its decode; property tests bitmap = graph
# walk on random DAGs. See .nornir/git-index-design.md. gunnar takes it by `cargo update`.
# 0.2.4 (2026-11-01, gitidx, ZNIPPY-CLIENT-BASES-FOLD): the thin-fetch voucher (client_bases, the
# closure of the client's haves) answers from the last committed fold while the indexer holds the
# absorb gate — a have the fold does not know contributes nothing (a smaller voucher, the safe
# direction) — instead of being refused with "index in progress"; a want is still refused by name.
# gunnar can drop GF-4 (71023a43, re-emit without the voucher). gunnar takes it by `cargo update`.
version = "0.2.4"
edition = "2024"
description = "Git object-store metadata plugin for znippy (native builtin — no WASM). Carries the reserved oid / commit-graph / reachability sub-indexes."
license = "MIT"
repository = "https://git.gunnar.rs/nordisk/znippy"
authors = ["Ignalina ApS"]
# Native-only handler, like znippy-plugin-skidbladnir: a plain rlib linked into
# znippy-cli's builtin register. Deliberately NOT compiled to WASM — the oid
# index's hot path is `stree`, which needs AVX2, an mmap and prefetch; wasm has
# none of those, so the index would lose exactly what it is for.
[lib]
crate-type = ["rlib"]
[features]
# The measured workloads behind the `znippy.git_*` benches, plus the
# binary-search baseline the stree keyspace is compared against. OFF by default:
# none of it is linked into a shipped archiver, and the rival index (fst) and the
# archive writer (znippy-compress) arrive only with it.
#
# It lives behind a feature rather than in `xtask` because a znippy worktree
# cannot build xtask at all (see CLAUDE.md) — this way the workload compiles and
# runs anywhere, and the registered `Bencher` impls just call it.
bench-kernels = ["dep:fst", "dep:znippy-compress"]
# Passthrough for `znippy-common/openzl`. ON by default, so this crate's default
# build is byte-unchanged.
#
# Without this the feature is optional on znippy-common and unreachable from
# here: a consumer that sets `default-features = false` on its OWN znippy-common
# edge still gets the codec, because THIS crate takes znippy-common with defaults
# and cargo unions features across every edge. Measured from gunnar-coldtier,
# which depends on znippy-common, znippy-compress and znippy-plugin-git at once:
# opting out on one of three edges changed nothing. A feature only counts as
# selectable if every path to it can be switched off.
default = ["openzl"]
openzl = ["znippy-common/openzl", "znippy-compress?/openzl"]
[dependencies]
git-storage-trait = { version = "0.1.0", path = "../../../git-storage-trait" }
znippy-common = { version = "0.10.5", path = "../../../znippy-common", default-features = false }
znippy-zoomies = { version = "0.1.26", path = "../../../../znippy-zoomies" }
anyhow = "1"
hex = "0.4.3"
sha1 = "0.11"
sha2 = "0.11"
roaring = "0.11"
# bench-kernels only — the rival index the oid keyspace is measured against, and
# the writer the archive-build workload seals through.
fst = { version = "0.4.7", optional = true }
znippy-compress = { version = "0.10.0", path = "../../../znippy-compress", optional = true, default-features = false }
# The un-sealed tail of `read_stack` — the durable truth the Ragnar stree falls
# through to. The same engine as `skade`'s catalog, on purpose: the
# stree-in-front / redb-behind arrangement is copied from there rather than
# reinvented. Pure Rust, no C toolchain.
#
# redb 4 since 2026-10-06, and NOT skade's major any more: this is one database
# PER REPOSITORY, and redb 2 spends 540 KB of disk creating one and 1.6 MB once
# it has been closed — a small repository's whole fixed cost (MEASURED on XFS,
# gunnar `tests/repo_overhead.rs`). redb 4: 4 KB at create, tens of KB in use.
# `redb2` stays for one job only: reading a tail an older build wrote, once, to
# migrate it (`read_stack::migrate_redb2_tail`).
redb = "4"
redb2 = { package = "redb", version = "2.6" }
# `pack_walk`'s only dependency, and it adds nothing to the build graph: this is
# the same crate and the SAME pure-Rust backend `ldeflate` already pulls in
# non-optionally through `znippy-common`, so `--no-default-features` still builds
# with no C toolchain, no cmake and no build-script network. A pack entry has no
# length field, so finding entry n+1 means running entry n's zlib stream to its
# end and asking how many input bytes it consumed — that is the one thing the
# walk cannot do without a decompressor.
flate2 = { version = "1.1", default-features = false, features = ["zlib-rs"] }
tracing = "0.1"
# `archive_write`'s io_uring arm. Both are pure Rust — `io-uring` ships the
# syscall bindings without bindgen (its `overwrite` feature is off), so this
# does NOT add a C toolchain step and `--no-default-features` still builds in
# seconds. Linux-gated because the arm itself is: on any other target
# `uring_write` compiles to nothing rather than to a pwrite path wearing an
# io_uring name.
[target.'cfg(target_os = "linux")'.dependencies]
io-uring = "0.7"
libc = "0.2"
# The verbatim blob file is mapped read-only instead of `pread`-ed per object:
# an append-only file whose bytes `gc` never rewrites is safe to map, and the
# page cache already holds them. Same version xtask already takes.
memmap2 = "0.9"
[dev-dependencies]
tempfile = "3"
znippy-compress = { version = "0.10.0", path = "../../../znippy-compress" }
# Bench baselines only (`examples/push_path_bench.rs`): gix's own `index-pack`
# equivalent, so the three Arrow arms are judged against what a git server
# already has rather than only against each other. dev-only — nothing here is
# linked into a shipped archiver, and znippy's lock already carried gix-pack.
#
# `parallel` is ON for the gix arm on purpose: `git index-pack` threads by
# default, so a single-threaded gix would be a strawman. It costs no rayon —
# gix-features' `parallel` is `crossbeam-channel` + `parking_lot`, verified in
# gix-features 0.49's manifest. LAW 3 is about OUR fan-outs, and ours is gatling.
gix-pack = { version = "0.75", features = ["streaming-input", "sha1", "parallel"] }
gix-features = { version = "0.50", features = ["progress", "parallel"] }
gix-hash = { version = "0.27", features = ["sha1"] }
# gix 0.88 reports failures as `gix_error` exceptions (test-side conversion).
gix-error = "0.4"
gix-object = "0.65"