nornir 0.4.20

Companion to cargo: dependency tracking, release gating, deploy, benchmarks, and documentation assembly. Project-agnostic.
Documentation
//! Knowledge-map producers (pure-Rust).
//!
//! Three scanners that fill the symbol/call/feature/git-heat tables in
//! the iceberg warehouse so the viz layer can draw a complete map
//! without ever invoking `cargo` or `rustdoc`:
//!
//!  - [`symbols::scan_repo`]  — walks every `Cargo.toml`, parses every
//!    `.rs` file with `syn`, emits one row per discovered item plus
//!    one row per call expression and one row per `#[cfg(...)]` attr.
//!  - [`git_heat::scan_repo`] — uses `gix` to walk HEAD's commit graph
//!    and aggregate per-file commit count / author count / recency.
//!
//! Both producers are idempotent — every scan generates a fresh
//! `snapshot_id` (UUID v4) and appends. The renderer reads the latest
//! snapshot per repo.

pub mod git_heat;
pub mod query;
pub mod symbols;

use std::path::Path;

use anyhow::Result;
use uuid::Uuid;

/// One end-to-end scan: symbols + features + calls + git-heat for
/// `<repo_root>`.
pub fn scan_all(repo_root: &Path, repo_name: &str) -> Result<ScanResult> {
    let symbol_snapshot = Uuid::new_v4();
    let git_snapshot = Uuid::new_v4();
    let now = chrono::Utc::now();

    let symbols = symbols::scan_repo(repo_root, repo_name, symbol_snapshot, now)?;
    let git = git_heat::scan_repo(repo_root, repo_name, git_snapshot, now)?;

    Ok(ScanResult { symbols, git })
}

#[derive(Debug)]
pub struct ScanResult {
    pub symbols: symbols::SymbolScan,
    pub git: git_heat::GitHeatScan,
}