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 walk_builder;
45mod walk_iter;
46mod walk_platform;
47mod walk_types;
48mod walk_visit;
49mod walker;
50mod watch;
51#[cfg(feature = "notify")]
52mod watch_notify;
53
54pub use cache::{SCAN_CACHE_FORMAT_VERSION, ScanCache, ScanCacheEntry};
55pub use config::{
56    CacheValidationPolicy, ContentValidationPolicy, EvidenceMode, IgnorePolicy, ScanLimits,
57    ScanOptions, StandardSkips,
58};
59pub use content_visit::{
60    ChangedContentVisitOutcome, ChangedContentVisitReport, ContentFile, ContentFileStatus,
61    ContentVisitControl, ContentVisitEvent, ContentVisitMode, ContentVisitReport,
62    MultiContentVisitReport,
63};
64pub use control::CancellationToken;
65pub use delta::{DeltaQuality, ModifiedFile, RenamedFile, ScanDelta};
66pub use error::{Error, Result};
67pub use file_types::NamedFileTypes;
68pub use ignore::{IgnoreFile, RepositoryMatch, RepositoryMatcher};
69pub use multi_scanner::{MultiScanReport, MultiScanner};
70pub use parallel::{
71    ParallelVisitReport, ParallelWalkIter, ParallelWalkReport, ParallelWalker, WalkControl,
72    WalkEvent,
73};
74pub use parallel_multi::{
75    ParallelMultiVisitReport, ParallelMultiWalkEvent, ParallelMultiWalkReport, ParallelMultiWalker,
76};
77pub use portable_report::{
78    PortableIgnoreSourceEvidence, PortableScanReport, PortableScanWarning, PortableScannedFile,
79    PortableSkippedEntry,
80};
81pub use report::{
82    CompactContentEvidence, CompactScanReport, CompactScannedFile, FileIdentity, FileVersion,
83    IgnoreSourceEvidence, IgnoreSourceKind, ScanCacheStats, ScanReport, ScanTermination,
84    ScanWarning, ScannedFile, SkipKind, SkippedEntry,
85};
86#[cfg(feature = "rayon")]
87pub use runtime::RayonExecutor;
88pub use runtime::{ParallelExecutor, ParallelJob, ParallelRuntime};
89pub use scan_stream::{ScanSink, ScanSinkControl, ScanStreamReport};
90pub use scanner::{Scanner, scan_repository, scan_repository_compact};
91pub use selection::{SelectionDecision, SelectionDisposition, SelectionMatcher};
92pub use snapshot::{SnapshotContent, SnapshotContentProvider, SnapshotEvidence, SnapshotReadError};
93pub use stateful_walk::{
94    ParallelStatefulWalker, StatefulWalkBuilder, StatefulWalkEntry, StatefulWalker,
95};
96pub use walk_builder::{MultiWalker, WalkBuilder};
97pub use walker::{
98    ErrorPolicy, RootSymlinkPolicy, WalkEntry, WalkError, WalkOperation, WalkOptions,
99    WalkSkipReason, Walker,
100};
101pub use watch::{WatchEvent, WatchEventKind, WatchPlan, WatcherEventAdapter};