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

nordisk/nornir

crates/mimir-lens/README.md

nornir-mimir-lens (mimir_lens)

The Mímir lenses of nornir: analyses over a Mímir v2 dump of a Rust workspace (the source graph: nodes, edges, spans, symbols as Arrow files) and over nornir's warehouse tables. dwarves lens and cargo lens are the command-line doors; this crate is the library. The user guide (install, dump, every lens, the target architecture, the reports) is docs/v2/mimir/lens-guide.md; the reference with every lens's math is docs/v2/mimir/lenses.md.

Build requirement

Feature lenses links the system SuiteSparse:GraphBLAS 7.x dynamically (through graphblas-sys); install it first:

sudo apt-get install -y libgraphblas-dev      # Ubuntu / Debian: GraphBLAS 7.4

Without it, use default-features = false with lens-graph and/or viz, or depend on nornir-mimir-reach directly.

Example

,no_run
use mimir_lens::lenses::{self, reach_set::ReachArgs};

// A Mímir v2 dump directory (`cargo mimir-dump` writes one); the graph is cached.
let g = lenses::all::loaded(std::path::Path::new("path/to/mimir-dump"))?;
// Reach on GraphBLAS: does every entry reach a target?
let report = lenses::reach_set::run(
    &g,
    &ReachArgs {
        entries: vec!["app main()".into()],
        must_reach: vec!["app authorize".into()],
        ..Default::default()
    },
)?;
println!("{}", report.text(0));
# Ok::<(), anyhow::Error>(())

Licence

MIT OR Apache-2.0. SuiteSparse:GraphBLAS (linked, not vendored) is Apache-2.0, Copyright Timothy A. Davis.