Gunnar

nordisk/edda

crates/gunnar-delta/Cargo.toml

[package]
name = "gunnar-delta"
version = "2.0.0"
edition = "2021"
rust-version = "1.85"
license = "MIT OR Apache-2.0"
repository = "https://git.gunnar.rs/nordisk/edda"
description = "The encoder half of git's pack delta format, which gitoxide does not have. Plumbing only, no gunnar types."
keywords = ["git", "delta", "packfile", "compression"]
categories = ["compression", "development-tools"]

# ── donation shape (D21) ────────────────────────────────────────────────────
#
# Dependency versions are written out here rather than inherited from the
# workspace on purpose: this crate must be liftable out of gunnar's tree with
# `cp -r` and build unchanged. `version.workspace = true` would make the
# manifest meaningless outside this repository, which is exactly the coupling
# D21 exists to prevent. The package metadata is spelled out for the same
# reason.
#
# There is deliberately NO gunnar dependency, and there never may be one.
# `crates/gunnar-delta/tests/donation_shape.rs` asserts it.

[dependencies]
# Object identity and kind: the only two things the window search needs to know
# about a git object besides its bytes.
gix-hash = { version = "0.27", features = ["sha1"] }
gix-object = "0.65"
# `parallel` is what makes `in_parallel_with_slice` the threaded implementation
# rather than a `for` loop; without it the whole crate is silently serial and
# nothing warns (P-002 in `.nornir/performance-design.md`, the same trap one
# crate over). `progress` gives the `prodash` re-exports.
gix-features = { version = "0.50", features = ["parallel", "progress"] }
thiserror = "2"

[dev-dependencies]
# Round-trip verification goes through gix's OWN decoder, never this crate's:
# `gix_pack::data::File::decode_entry`. `gix_pack::data::delta::apply` is
# `pub(crate)`, so the only reachable decoder is the one that reads a real
# packfile, which is why `tests/support/pack.rs` writes real packs.
gix-pack = { version = "0.75", features = ["streaming-input"] }
flate2 = { version = "1", default-features = false, features = ["zlib-rs"] }
sha1 = "0.11"
tempfile = "3"

[features]
default = ["simd"]
# Runtime-detected SIMD for the match scan. Off means the portable word-at-a-time
# path everywhere, which is also what a differential test compares against, so
# this feature is never allowed to change the output bytes.
simd = []



# Measurement, not decoration. `examples/bench.rs` is what the SIMD and
# multi-core claims in the module docs are worth; `examples/repack_compare.rs`
# packs a real repository with this crate and with stock `git` and prints both
# sizes. Examples rather than `benches/` so that neither pulls in a benchmark
# harness dependency. This crate has to stay liftable (D21).

[[example]]
name = "bench"

[[example]]
name = "repack_compare"