source-mesh-core
Dependency graphs, cycle reports, and outgoing dependency limits for Rust projects.
Exports DOT, Mermaid, and GraphML. The source-mesh package provides the CLI.
use PathBuf;
use Input;
use Request;
use Format;
Input::Project(Project::new(project_path, configuration)) requires a Rust toolchain with rust-analyzer and rust-src.
configuration is an optional path to rust-analyzer JSON configuration.
Input::ScipFile loads the index during request construction and reuses it on subsequent runs. It cannot be combined with
save_scip.
Request options (boolean flags default to false):
.cycles(...):CycleOptions::builder()configures highlighting, reports, and failure on cycles. Each report defaults to at mostDEFAULT_CYCLE_LIMITsimple cycles..outgoing_dependencies(...):OutgoingDependencyOptions::builder().maximum(5).build()sets a dependency limit. The default scope is folders;.mode(outgoing_dependencies::Mode::Files)selects files, and.output(path)adds a Markdown report..exclusions(...):Exclusions::new(...)compiles project-relative glob patterns for all graphs and checks. An empty filtered graph is an error..analyzer(analyzer_options::Options::new(true))enables verbose diagnostics..protected_inputs(...):InputFilevalues protect additional input files and their aliases from output overwrites.
Counting and filtering rules are described under outgoing dependency limits and file exclusions.
run writes requested outputs before returning cycle or dependency-limit failures. Validation and analysis errors preserve
existing outputs; output I/O errors can leave partial results. Input files remain protected against output overwrites through
renames and aliases.
See the changelog and development guide.