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

nordisk/edda

crates/nornir-knowledge-view/Cargo.toml

# nornir-knowledge-view — the ONE reader over the persisted knowledge map
# (`symbol_facts` + `call_edges`).
#
# WHY A LEAF. The knowledge map is a WAREHOUSE artifact — the owner's syn scanner
# writes it — but the READER is needed on both sides of the release seam: the
# owner answers callers/callees/defined-in/symbol-lookup over it, and the release
# orchestrator's SEMANTIC-BLAST gate walks the same call graph to bound a
# release's blast radius. The orchestrator may not take a crate edge on the
# owner's umbrella, so both halves carried their own copy of the reader —
# including `load_latest_audited` and `call_path`, the two single largest
# duplicated function bodies in the constellation.
#
# PRE-PROMPT L5/L5a: the reader is a primitive (self-contained, dep-light, no
# domain coupling, reasons only over the `nornir-warehouse-trait` seam), so it
# lives here ONCE and both conductors consume it. The syn/SCIP SCANNERS that
# WRITE these tables, and the SCIP moniker-join preference helpers, stay with the
# conductors.
[package]
name = "nornir-knowledge-view"
# 0.1.2: 0.1.1 shipped with the znippy-zoomies floor understated at 0.1.13 and is
# BROKEN on the registry — it cannot compile against its own stated minimum. Its
# bytes are immutable, so the fix is a new version. My own miss: I published 0.1.1
# to clear an arrow-58/59 mismatch and did not check its other floors.
version = "0.2.0"
edition = "2021"
description = "The reader over nornir's persisted knowledge map: a KnowledgeView of a repo's latest symbol_facts + call_edges snapshot, with a memoized inverted index behind callers_of / callees_of / call_path and a two-phase snapshot-pushdown loader over the backend-neutral nornir Warehouse seam."
license = "MIT OR Apache-2.0"
repository = "https://git.gunnar.rs/nordisk/edda"
keywords = ["knowledge", "callgraph", "warehouse", "index"]
categories = ["development-tools"]
exclude = ["/.nornir/"]

[features]
default = []
# The R2.1 "Ragnar" BATCHED accelerator: a sorted-key `stree32` (cache-line
# Eytzinger S+tree, SIMD + software-prefetch, from the sibling znippy-zoomies)
# behind the two posting maps, exposed as `callers_of_batch` / `callees_of_batch`.
# Results are byte-identical to the per-name HashMap path — the tree changes only
# HOW a key is located, never WHAT is returned — and it falls back to the HashMap
# when the tree is empty. OFF by default so a consumer that only needs the reader
# pays no znippy-zoomies dependency.
stree = ["dep:znippy-zoomies"]

[dependencies]
anyhow = "1"
arrow = { version = "59", features = ["json", "prettyprint"] }
# The backend-neutral `Warehouse` trait, the knowledge POD row types
# (`SymbolRow`/`CallEdgeRow`), the `ScanFilter` pushdown surface and the
# knowledge-map table names. This crate names ONLY this seam — never a concrete
# warehouse engine — which is what lets both conductors consume it.
nornir-warehouse-trait = { version = "0.2.0", path = "../nornir-warehouse-trait" }
# The SHARED depgraph model — reused for its function-tier PODs
# (`funcgraph::{FnNode, FnEdge, CrateFuncGraph}`) so `function_graph` hands the
# WORLD GRAPH a REAL function tier without minting a parallel graph type. This is
# a pure, warehouse-free / egui-free leaf (no cycle: depgraph names nothing here).
# `0.1.2`, not `0.1`: this crate calls `nornir_depgraph::funcgraph`, which does not exist
# in 0.1.1 — the lowest version a bare `0.1` admits. The `path` masks it (cargo resolves
# through the path here) and a caret requirement resolves to the newest match everywhere
# else, so nothing but a FLOOR check could see it. Raised by `min_req_gate`.
nornir-depgraph = { version = "0.1.2", path = "../nornir-depgraph" }
# `stree` only — Ragnar Groot Koerkamp's static search tree, REUSED (never
# re-written) as the batched-lookup accelerator. znippy-zoomies is HANDS-OFF:
# consumed as published, never edited from here.
# Floor 0.1.13 -> 0.1.23: `STree32::len()` does not exist in 0.1.13, so a consumer
# resolving the stated minimum gets a type whose `.len()` falls through to
# `arrow::array::Array` and fails E0599. Local and registry are both 0.1.23.
znippy-zoomies = { version = "0.1.23", path = "../../../znippy-zoomies", optional = true }

[dev-dependencies]
# The crate's own tests exercise the batched accelerator against the HashMap and
# linear-scan oracles, so the test build turns `stree` on (feature unification).
nornir-knowledge-view = { path = ".", features = ["stree"] }
# The loader tests need a `Warehouse` stand-in; the seam's ONE test double lives
# in the ledger leaf (dev-only, so this adds no runtime edge).
# NO `version =` on purpose: a versioned path dev-dep is still RESOLVED by
# `cargo publish` even though dev-deps are stripped from the uploaded manifest, so
# it fail-stops whenever the sibling is not already live on the registry — which
# `nornir-release-ledger` is not. Path-only is the shape that publishes.
nornir-release-ledger = { path = "../nornir-release-ledger", features = ["testkit"] }