Module Overview
symtrace is a single Rust binary. Each source file handles one part of the pipeline.
Modules
Section titled “Modules”| Module | What it does |
|---|---|
main.rs | Runs the pipeline, dispatches work in parallel |
cli.rs | Defines command-line arguments |
git_layer.rs | Opens the repo, resolves commits, reads file contents |
language.rs | Maps file extensions to languages |
ast_builder.rs | Parses files into syntax trees |
ast_cache.rs | Caches parsed trees in memory and on disk |
incremental_parse.rs | Reuses previous parses for faster re-parsing |
node_identity.rs | Computes the four fingerprint hashes per node |
tree_diff.rs | Runs the matching algorithm to classify changes |
semantic_similarity.rs | Scores how similar two matched nodes are |
refactor_detection.rs | Detects refactor patterns (extract, move, rename) |
symbol_tracking.rs | Tracks symbols across files |
commit_classification.rs | Labels the commit type (feature, bugfix, etc.) |
output.rs | Renders CLI or JSON output |
types.rs | Shared data types used across modules |
Data flow
Section titled “Data flow”cli.rs -> git_layer.rs -> ast_builder.rs -> node_identity.rs | tree_diff.rs | refactor_detection.rs | symbol_tracking.rs | commit_classification.rs | output.rsDesign highlights
Section titled “Design highlights”- Caching — parsed trees are cached in an in-memory LRU and on disk, so repeated runs are fast.
- Parallelism — files are processed independently and concurrently.
- Resource limits — configurable guards prevent runaway parsing on very large or adversarial files.