Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/gunnar

crates/gunnar-store/Cargo.toml

[package]
name = "gunnar-store"
version = "2.0.0"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
# On the `cargo install gunnar` chain (owner order 2026-10-22).
publish = true
authors.workspace = true
repository.workspace = true
description = "The gunnar server's storage seam: RepoStore (which repository), SecretStore (what has no git equivalent), and the one conformance suite both GitOps backends run"
readme = "README.md"

[features]
# Nothing by default. The default build is the *contract* half of this crate,
# and since 2026-08-10 that is ALL of it: `RepoStore`, `SecretStore`, the
# reference-name rules and the error type. The Arrow log and its history reader
# moved to `gunnar-core`, which took `arrow-ipc`/`arrow-array`/`arrow-schema`
# with them — see `src/lib.rs`. Both `GitOps` backends dev-depend on this crate
# from other repositories to run the conformance suite, and a contract crate
# that makes them resolve Arrow is a contract crate that failed at its one job.
default = []
# The conformance suite and the in-memory control it is self-tested against.
#
# Off by default and it must stay off, because it is the only thing here that
# needs a packfile writer, an inflater and a scratch directory. Both `GitOps`
# backends turn it on as a **dev**-dependency, which is how the Arrow arm can run
# the suite without `gix-object` reaching its shipped artifact (R1 permits gix in
# dev-dependencies and states why: an oracle in a test is a feature).
conformance = ["dep:tempfile", "dep:flate2", "dep:gix-object"]

[dependencies]
# THE contract. By path, deliberately: it lives with its main implementation in
# znippy (the three-repo split) and gunnar consumes it rather than owning it.
# This edge is the whole point of the 2026-08-10 demolition — before it, no
# crate in gunnar depended on `git-storage-trait` at all (the dependency picture's "gap").
git-storage-trait = { version = "0.1.2" }
# `RepoStore::hash_kind()` names it, and that signature is frozen. It is also the
# hasher the conformance fixture computes object ids with, so no part of this
# crate invents its own (one implementation).
gix-hash = { workspace = true }
gix-error = { workspace = true }
anyhow = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
# `conformance` feature only.
#
# `gix-object` decodes commits and trees for the in-memory control's `reachable`
# walk and computes object ids for the fixture. Hand-rolling either would be a
# second definition of what a git object is, which is the twinning one implementation forbids.
gix-object = { workspace = true, optional = true }
# Inflates and deflates the fixture packfile's entry payloads. Nothing else in
# this crate compresses anything.
flate2 = { workspace = true, optional = true }
tempfile = { workspace = true, optional = true }

[dev-dependencies]
# Turns on `conformance` for this crate's own test builds without putting any of
# its three dependencies into a default build.
gunnar-store = { path = ".", features = ["conformance"] }
tempfile = { workspace = true }
# **The outside oracle for the fixture packfile.** The suite writes its own
# packs (see `conformance::pack`), so the suite's writer and the in-memory
# control's reader agree with each other by construction — which is worth
# nothing on its own (one implementation, no twin). `gunnar_pack::index_pack` is an
# implementation with no stake in either, and one test drives it over the same
# bytes and compares the oids. A dev-dependency, so a downstream backend running
# the suite never links it.
# PATH ONLY, no `version` — see `xtask/tests/publish_order.rs`: a versioned
# dev-only sibling is an ordering constraint written where the thing that
# computes the order cannot read it.
gunnar-pack = { version = "3.0.0" }
# **The outside oracle for `src/object.rs`.** That module replaced `gix-object`
# in the serving tier on 2026-08-10 — seven crates for four grammars gunnar
# reads and never writes. A decoder nobody disagrees with is a decoder nobody
# has checked, so `tests/object_decode.rs` runs gunnar's answer and gix's over
# the same bytes and asserts they match, field by field, for every commit, tree
# and tag shape the suite can think of. Test-only: nothing under `src/` names
# it outside the `conformance` feature, and no appliance build links it.
gix-object = { workspace = true }
# The swallowed errors this crate used to have are now `error!` lines,
# and "it emits an error" is only a claim until a subscriber has caught one.
tracing-subscriber = { workspace = true }

[lints.rust]
unsafe_code = "forbid"