hn.today

Show HN: graf (1000x faster graphify in Rust)

github.com8 points2 comments
Screenshot of Show HN: graf (1000x faster graphify in Rust)

Graf is a Rust reimplementation of Graphify that builds and queries a code-and-docs graph much faster and with fewer runtime dependencies. Instead of reloading a NetworkX graph in Python for every query, it keeps an indexed SQLite graph on disk and updates only changed files; the whole tool runs as a single native binary with no Python environment, API keys, background service, or model. It emphasizes correctness and reproducibility by making updates visible as an atomic generation and by returning ambiguity plus source evidence when multiple symbols match. Typical workflows use commands like graf index, graf update, graf query and store the database at .graf/index.db; JSON output and exact node IDs are supported for automation and agents.

Benchmarks and migration details underline the practical gains: on the 19k-file VS Code repository Graf reports 1000× faster search (13 ms vs 13.26 s) and 89× faster no-op updates (880 ms vs 77.97 s), while producing 2.4× as many nodes, 1.7× as many edges, and using 31% less peak memory. It provides a migration path from Graphify (graf switch graphify), integrations for coding agents (graf install …), and can be built from source with Rust 1.90+. It is an independent Apache-2.0-licensed project targeted at large codebases and agent workflows where cross-file relationship queries are a bottleneck.

Read on github.com2 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.