Skip to main content

deprot_core/
lib.rs

1//! # deprot-core
2//!
3//! The **pure, zero-I/O** heart of deprot. Everything here is deterministic: given the same
4//! [`Facts`] and the same reference time, [`score`] always returns the same [`Score`]. That is
5//! what makes the scoring engine fully unit-testable and replayable from cached fixtures — no
6//! network, no clock, no filesystem reach into this crate.
7//!
8//! The data pipeline is: an ecosystem manifest yields [`Dependency`] values, the collector turns
9//! each one into [`Facts`], and this crate turns [`Facts`] into a [`Score`] (a 0–100 value, a
10//! letter [`Grade`], a [`Tier`] verdict, and the list of [`Signal`]s that explain it).
11
12mod facts;
13mod graph;
14mod maintainers;
15mod score;
16mod signals;
17mod typosquat;
18
19pub use facts::{Dependency, Ecosystem, Facts, Severity, Vuln};
20pub use graph::{DepGraph, DepNode};
21pub use maintainers::{capture_risk, top_share, MaintainerReach};
22pub use score::{score, Grade, Score, Tier};
23pub use signals::Signal;
24pub use typosquat::{scan as typosquat_scan, Suspect};