ryo-analysis
Status: stable. Part of the ryo workspace — AST-centric Rust programming for AI agents.
Code graph and discovery engine. AST-first: symbols are identified by their
AST hierarchy (SymbolPath); physical files are derived as a View layer.
CodeGraphV2 provides fast relationship traversal (calls, type references,
trait impls, container hierarchy).
Install
Optional features:
| Feature | Effect |
|---|---|
workspace |
Pulls in ryo-metadata for workspace-wide resolution |
schemars |
JSON Schema derive |
testing |
Re-exports ryo-symbol's test-utils |
literal-search |
Full-text literal search via tantivy |
Quickstart
use ;
let path = builder
.push
.push
.build?;
let mut registry = new;
let id = registry.register?;
// Fast O(1) lookup
let resolved = registry.resolve;
API Summary
| Module | Purpose |
|---|---|
context::AnalysisContext |
Workspace-wide analysis state |
discovery::* |
Symbol search and pattern discovery |
query::CodeGraphV2 |
Call / type / trait / container graph |
query::TypeFlowGraphV2 |
Type-level usage and dependency graph |
query::SpecFlowGraphV2 |
@spec: directive graph |
cascade::* |
Cascade analysis (change-impact) |
pattern::* |
Pattern-driven symbol detection |
literal::* |
Literal value search (with literal-search) |
import_map_builder::* |
Import / use resolution |
SymbolPath, SymbolId, SymbolKind, SymbolRegistry, CodeEdgeV2 and
related types are re-exported at the crate root.
Status
API surface considered stable for the v0.1.0 release.
License
Licensed under either of Apache-2.0 or MIT at your option.