znippy-plugin-git 0.1.0

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"
version = "0.1.0"
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]
znippy-common = { version = "0.9.13", 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.11", path = "../znippy-compress", optional = true, default-features = false }

[dev-dependencies]
tempfile = "3"
znippy-compress = { version = "0.9.11", path = "../znippy-compress" }