Map the crate graph deterministically
Codna resolves modules, trait impls, generic bounds, and borrow relationships across your workspace in about 60ms — no embeddings, no RAG, and zero LLM tokens.
Ownership, trait resolution, and lifetimes scatter a Rust bug across crates and impl blocks. Codna is an AI Rust pair programmer that builds the dependency graph deterministically — for zero LLM tokens — so each fix starts from facts, not a guess.
The problem
A failing assertion in Rust rarely lives where it surfaces. The cause is often a trait impl in another module, a generic bound the compiler silently widened, or a borrow that outlives its owner three callers up the chain. So you read the panic, chase the backtrace across a workspace of crates, and lose an afternoon rebuilding the mental model the compiler already has. General AI debugging tools make this worse by reading the entire workspace into context — slow, lossy, and expensive — and still missing the cross-crate impl that actually broke. Codna resolves the module and trait graph first, including blast radius across workspace crates, and hands the agent only the evidence that matters.
How Codna fixes it
Codna resolves modules, trait impls, generic bounds, and borrow relationships across your workspace in about 60ms — no embeddings, no RAG, and zero LLM tokens.
Instead of the whole crate, the AI coding agent gets the failing test, the call chain, and the suspect impl — measured 162x less context than reading the repo.
Codna re-runs your own suite; the patch ships only when it compiles cleanly and the failing test passes — about $0.04 per verified fix.
cargo install codna\ncodna fix . --issue "Config::from_str panics on empty TOML instead of returning Err"
What you get
The deterministic engine walks your module and trait graph for 0 LLM tokens — no indexing job, no embeddings to keep warm, no per-token bill just to understand the code.
The failing test is the oracle. A Rust fix only lands after it compiles and your existing cargo test suite goes green, so you review a verified diff, not a plausible-looking guess.
Because Codna fixes from a ~600-token evidence bundle instead of 100k+ tokens of repo, a verified Rust fix costs pennies — not the dollar-plus a typical whole-repo agentic edit runs.
The proof
It maps your crate graph deterministically first — modules, trait impls, generic bounds, and blast radius — for zero LLM tokens. The AI coding agent then works from a ~600-token evidence bundle, which is measured 162x less context than reading the whole workspace.
Yes. Every fix is verified against your existing cargo test suite; the failing test is the oracle, and the patch must compile cleanly and pass before it lands. You review a green diff, not a suggestion.
Yes. The deterministic graph resolves trait impls, generic bounds, and the borrow relationships the bug depends on across modules, so the agent fixes the actual cause rather than a symptom.
Yes. Codna maps cross-crate dependencies the way Cargo resolves them, so a fix in one crate accounts for its blast radius across the whole workspace, including path and dev-dependencies.
Yes. Codna ships as a CLI, as an MCP server for Cursor and Claude, and as a native GitHub App, so you can drive a fix from the terminal, your editor, or a pull request.
A verified fix is about $0.04 because Codna works from ~600 tokens, not the entire repo. For private work you can self-host with your own keys (BYOK), fail-closed egress, and no training on your code.
Related