Skip to main content

provenant/
lib.rs

1//! # Provenant
2//!
3//! `provenant` is the library crate behind the `provenant` CLI. It
4//! provides ScanCode-compatible scanning, package parsing, and output-writing
5//! building blocks for Rust applications.
6//!
7//! The main entry points are:
8//!
9//! - [`process`] and [`process_with_options`] to scan a directory tree
10//! - [`OutputFormat`], [`OutputWriter`], and [`write_output_file`] to serialize scan results
11//! - [`parsers`] and [`models`] for lower-level package parsing and result inspection
12//!
13//! High-level crate organization:
14//!
15//! - [`scanner`] orchestrates traversal, filtering, and scan execution
16//! - [`parsers`] extracts package metadata from ecosystem-specific inputs
17//! - [`copyright`] and [`finder`] extract text clues such as copyrights, emails, and URLs
18//! - [`output`] renders ScanCode-compatible and SBOM-oriented output formats
19//! - [`models`] defines the core scan result data structures
20//!
21//! User-facing installation, CLI usage, supported format coverage, and broader
22//! architecture notes live in the repository documentation. The crate-level
23//! rustdoc stays intentionally concise so fast-changing project details have a
24//! single source of truth outside this file.
25
26pub mod askalono;
27pub mod assembly;
28pub mod cache;
29pub mod cli;
30pub mod copyright;
31pub mod finder;
32pub mod golden_maintenance;
33pub mod models;
34pub mod output;
35pub mod parsers;
36pub mod progress;
37pub mod scanner;
38pub mod utils;
39
40#[cfg(test)]
41pub mod test_utils;
42
43pub use models::{ExtraData, FileInfo, FileType, Header, Output, SystemEnvironment};
44pub use output::{
45    OutputFormat, OutputWriteConfig, OutputWriter, write_output_file, writer_for_format,
46};
47pub use parsers::{NpmParser, PackageParser};
48pub use progress::{ProgressMode, ScanProgress};
49pub use scanner::{
50    ProcessResult, TextDetectionOptions, count_with_size, process, process_with_options,
51};