Skip to main content

weavatrix_scan/
lib.rs

1//! Deterministic, safe repository scanning for code-intelligence tools.
2//!
3//! `weavatrix-scan` never executes repository code or reads outside the
4//! repository boundary. Symbolic links are skipped by default and guarded by
5//! boundary/cycle checks when explicitly enabled.
6//!
7//! Use [`ScanReport::to_portable`] to cross trust boundaries without exposing
8//! host paths, and [`ScanReport::content_provider`] to reopen selected content
9//! with snapshot verification.
10
11mod cache;
12mod config;
13mod content;
14mod content_visit;
15mod control;
16mod default_file_types;
17mod delta;
18mod error;
19mod file_types;
20mod file_version;
21mod glob;
22mod hash;
23mod hidden;
24mod ignore;
25mod multi_scanner;
26mod parallel;
27mod parallel_multi;
28mod path;
29#[cfg(feature = "serde")]
30mod path_serde;
31mod pool;
32mod portable_report;
33mod report;
34mod runtime;
35mod scan_finalize;
36mod scan_limits;
37mod scan_match;
38mod scan_stream;
39mod scanner;
40mod selection;
41mod snapshot;
42mod stateful_walk;
43mod stdout;
44mod summary;
45mod walk_builder;
46mod walk_iter;
47mod walk_platform;
48mod walk_types;
49mod walk_visit;
50mod walker;
51mod watch;
52#[cfg(feature = "notify")]
53mod watch_notify;
54
55pub use cache::{SCAN_CACHE_FORMAT_VERSION, ScanCache, ScanCacheEntry};
56pub use config::{
57    CacheValidationPolicy, ContentDiscoveryMode, ContentValidationPolicy, EvidenceMode,
58    IgnorePolicy, ScanLimits, ScanOptions, StandardSkips,
59};
60pub use content_visit::{
61    ChangedContentVisitOutcome, ChangedContentVisitReport, ContentFile, ContentFileStatus,
62    ContentVisitControl, ContentVisitEvent, ContentVisitMode, ContentVisitReport,
63    MultiContentVisitReport,
64};
65pub use control::CancellationToken;
66pub use delta::{DeltaQuality, ModifiedFile, RenamedFile, ScanDelta};
67pub use error::{Error, Result};
68pub use file_types::NamedFileTypes;
69pub use ignore::{IgnoreFile, RepositoryMatch, RepositoryMatcher};
70pub use multi_scanner::{MultiScanReport, MultiScanner};
71pub use parallel::{
72    ParallelVisitReport, ParallelWalkIter, ParallelWalkReport, ParallelWalker, WalkControl,
73    WalkEvent,
74};
75pub use parallel_multi::{
76    ParallelMultiVisitReport, ParallelMultiWalkEvent, ParallelMultiWalkReport, ParallelMultiWalker,
77};
78pub use portable_report::{
79    PortableIgnoreSourceEvidence, PortableScanReport, PortableScanWarning, PortableScannedFile,
80    PortableSkippedEntry,
81};
82pub use report::{
83    CompactContentEvidence, CompactScanReport, CompactScannedFile, FileIdentity, FileVersion,
84    IgnoreSourceEvidence, IgnoreSourceKind, ScanCacheStats, ScanReport, ScanTermination,
85    ScanWarning, ScannedFile, SkipKind, SkippedEntry,
86};
87#[cfg(feature = "rayon")]
88pub use runtime::RayonExecutor;
89pub use runtime::{ParallelExecutor, ParallelJob, ParallelRuntime};
90pub use scan_stream::{ScanSink, ScanSinkControl, ScanStreamReport};
91pub use scanner::{Scanner, scan_repository, scan_repository_compact};
92pub use selection::{SelectionDecision, SelectionDisposition, SelectionMatcher};
93pub use snapshot::{SnapshotContent, SnapshotContentProvider, SnapshotEvidence, SnapshotReadError};
94pub use stateful_walk::{
95    ParallelStatefulWalker, StatefulWalkBuilder, StatefulWalkEntry, StatefulWalker,
96};
97pub use summary::ScanSummary;
98pub use walk_builder::{MultiWalker, WalkBuilder};
99pub use walker::{
100    ErrorPolicy, RootSymlinkPolicy, WalkEntry, WalkError, WalkOperation, WalkOptions,
101    WalkSkipReason, Walker,
102};
103pub use watch::{WatchEvent, WatchEventKind, WatchPlan, WatcherEventAdapter};