Hey r/rust,
I'm new to Rust and built a Forge mcp server because I couldn't find a tool that gave AI agents an accurate code graph while keeping them grounded in project docs and structured tasks.
Forge indexes code and Markdown into SQLite via Tree-sitter, creating a unified graph where doc rules link directly to symbols. It also coordinates agent tasks via ACDD (self-developed Augmented Context-Driven Development principles): Git milestones turn into an SQLite queue that hands agents stage-specific context and instructions at each gate via predefined workflow profiles.
It works well for my daily needs, but as a newcomer to Rust, I'd really appreciate advice on three architectural challenges:
First, on indexing accuracy: right now Forge extracts declarations, imports, calls, typed receivers, and local value-flow into SQLite FTS5. Without running a heavy language server or full compiler (rustc, tsc), what strategies or lightweight intermediate representations are commonly used in static indexers to resolve dynamic dispatch, macros, and cross-file calls more accurately without killing performance? It works pretty fast and gives good code coverage, I'm curious how I could make it better for wide set of languages.
Second, on multi-language architecture: currently, parsers and linkers live behind traits (LanguageProfile, LanguageLinker) toggled by Cargo features. As language and framework rules expand, keeping linker modules decoupled is getting tricky. What design patterns work best in Rust for keeping multi-language AST extraction and linking modular long-term?
Third, on distribution: compiling multiple Tree-sitter grammars makes the binary quite heavy, yet most developers only care about one stack (like Python or Rust or TS/JS/HTML).
When building an installer, is it better practice to distribute prebuilt per-language flavors, load grammars dynamically at runtime, or is a single fat static binary just the accepted standard in the ecosystem?
If you want to poke around or test it:
The repo is MIT: https://github.com/ContextUnity/contextunity-forge-mcp
You can build it with cargo install --path . --locked and run a quick check with contextunity-forge-mcp query overview on any repo, or connect it to Cursor / Claude Desktop via .mcp.json.
I'd really appreciate any honest code critique, architectural advice, or pointers on graph indexing strategies. Thanks!