znippy-plugin-git 0.1.1

Git object-store metadata plugin for znippy (native builtin — no WASM). Carries the reserved oid / commit-graph / reachability sub-indexes.
Documentation
[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.
version = "0.1.1"
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://codeberg.org/nordisk/znippy"
authors = ["Rickard Lundin <rickard@ignalina.dk>"]

# 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.9.14", path = "../../../znippy-common", default-features = false }
znippy-zoomies = { version = "0.1", path = "../../../../znippy-zoomies" }
anyhow = "1"
hex = "0.4.3"
sha1 = "0.10"
sha2 = "0.10"
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.9.10", path = "../../../znippy-compress", optional = true, default-features = false }
# The un-sealed tail of `read_stack` — the durable truth the Ragnar stree falls
# through to. Same engine and same major as `skade`'s catalog (`redb = "2"`,
# resolved 2.6.3, already in znippy's lock via znippy-iceberg), on purpose: the
# stree-in-front / redb-behind arrangement is copied from there rather than
# reinvented, and a second embedded KV in one constellation would be exactly the
# drift that copy is meant to avoid. Pure Rust, no C toolchain.
redb = "2"
# `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"] }

# `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.9.10", 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.73", features = ["streaming-input", "sha1", "parallel"] }
gix-features = { version = "0.49", features = ["progress", "parallel"] }
gix-hash = { version = "0.26", features = ["sha1"] }
gix-object = "0.63"