Rust · zero-copy · no_std
The general-purpose graph engine for Rust.
oxgraph is a zero-copy graph and hypergraph engine that runs over any storage: in memory, memory-mapped files, an embedded database, or Postgres. oxcode is code intelligence for coding agents across twenty languages, built on top of it.
bytes → validate → view → traverse
Headline numbers
incremental reindex — a 1-file edit writes a 2.8 MiB delta, not the 282 MiB database
languages indexed on a single pipeline
unsafe in the substrate (unsafe_code = forbid)
agent tokens through the oxcode MCP server (vs no tool)
engine measured 2026-06-10 · agent suite 2026-06-03 · release builds
Full tables ↓One layer is the foundation for the next
oxcode is the first downstream consumer of the oxgraph engine. Its benchmarks are the engine's realistic workload, not a synthetic one.
- 03oxcodereads through the engine
20-language indexing · agent navigation · oxcode mcp
- 02oxgraph-dban OxGraph-native database
embedded engine · catalogs · OxQL · durable identity
- 01oxgraph substratethe foundation
topology · layouts · snapshots · algorithms
Bytes → validate → view → traverse
Point a view at a byte slice, it validates the layout, you walk the graph. No parse step, no heap graph rebuilt from the bytes, no copy of the edges.
- Zero-copy by construction
- Reading a snapshot doesn't deserialize it: validate the container once, borrow its sections as typed slices, and traverse against the bytes. Opening a graph is closer to a memory-map than a parse.
- Storage-agnostic
- Algorithms bind to capability traits, not to a concrete container. The same BFS runs over an in-memory layout, a memory-mapped file, or rows read from a database.
- Topology, kept separate
- The foundation models what connects to what and refuses to interpret it. Layouts decide the byte representation; properties and domain meaning live in layers above.
- no_std and unsafe-free
- The core is no_std, and the substrate is unsafe-free (unsafe_code = forbid). Graph and hypergraph vocabularies share one topology base.
104proof harnesses verified under kani, the Rust model checker — 0 failures, in each crate's src/proofs.rs.
The crate family
a feature is the only thing that pulls a layer inFoundation
no_stdoxgraph-topologyCapability traits: elements, relations, incidences, roles, identity.oxgraph-graphBinary graph vocabulary: nodes, edges, directed traversal, neighbors.oxgraph-hyperHypergraph vocabulary: vertices, hyperedges, participants.oxgraph-snapshotTopology-agnostic byte container; borrow sections as typed slices.
Borrowed layouts
over slicesoxgraph-csrCompressed-sparse-row views, native or from a snapshot.oxgraph-cscInbound (compressed-sparse-column) views for reverse traversal.oxgraph-hyper-bcsrDirected bipartite-CSR hypergraph views, dense both ways.
Algorithms & data
tieredoxgraph-algoBFS and PageRank with no_std, alloc, and std tiers.oxgraph-propertyArrow-backed named, typed property layers.
Built on top
engineoxgraph-dbEmbedded OxGraph-native database: catalogs, queries, durable identity.oxgraph-postgresPostgres-backed engine over the same vocabulary.
Twenty languages, one indexing pipeline
oxcode indexes twenty languages into a native OxGraph database with tree-sitter, resolves references into graph relations, and serves deterministic, PageRank-curated context to coding agents over a CLI and the bundled MCP server — the open protocol that lets coding agents call tools. The resolver, graph, and storage stay language-neutral, so only the extractor changes per language.
Language coverage
20 indexed, plus Liquid recognizedHigh-fidelity
hand-writtenHand-written extractors that resolve receiver-typed method calls, qualified names, and imports precisely.
RustGoTypeScriptJavaScriptQuery-driven
generic engineOne tree-sitter query and profile per language. Symbols, span-nested containment, and approximate call edges, without receiver typing.
PythonJavaCC++C#PHPRubySwiftKotlinScalaDartLuaLuauObjective-CPascalEmbedded script
script-in-markupoxcode locates the <script> block and masks the rest of the file to whitespace, so the TypeScript extractor lands symbols at offsets accurate to the original component.
SvelteVueRecognized
skipped, not droppedDetected and reported rather than silently ignored. Symbol extraction is a follow-up.
LiquidCLI commands
contextsymbolsfilessymbolcallscallersqueryindexstatuslanguagesmcpMCP tools
oxcode_watchoxcode_exploreoxcode_searchoxcode_callersoxcode_calleesoxcode_symboloxcode_filesoxcode_statusThe 0.4.0 engine, end to end
oxgraph 0.4.0 restructures the engine — one write-through snapshot path, a self-checking container (per-section CRC-32C, verified at bind), and Arc-shared copy-on-write writes — and holds end-to-end indexing performance while doing it. Measured through oxcode against the oxgraph workspace itself.
oxgraph workspace
673 files · 10,428 symbols · 166,101 relations| Metric | on oxgraph 0.3.2 | on 0.4.0 | Change |
|---|---|---|---|
| Cold index | 4,717 ms | ~8% faster | |
| Reindex, no change | 66 ms | flat | |
| Incremental reindex (1-file edit) | 1,410 ms | flat | |
| Symbol query (p50) | 395 ms | flat | |
| Database size | 282.2 MiB | flat | |
| Delta-log written per edit reindex | 2.8 MiB | O(change) |
Agent task · “How does tokio schedule and run async tasks?”
One n=6 suite, run 2026-06-03. Change vs each tool's own no-tool baseline (negative is better). Quality is a blind LLM-judge score, 0–1. The MCP server is the headline: the same bounded, PageRank-curated context in one call. Its 0.93 quality is a completeness cost, not a correctness one — and the suite gates on it rather than hiding the row.
| Arm | Quality | Tokens | Cost | Tool calls | Wall |
|---|---|---|---|---|---|
| Baseline (no tool) | 0.98 | — | — | — | — |
| oxcode — CLI (gpt-5.5, n=6) | 0.96 | +15% | +4% | −4% | +14% |
| oxcode — MCP (gpt-5.5, n=6) | 0.93 | −74% | −57% | −84% | −60% |
| codegraph — MCP (Opus 4.8, published) | n/a | −38% | even | −57% | −18% |
scroll for cost · calls · wall →
Absolute MCP medians: tokens 395k → 104k · cost $0.17 → $0.07 · tool calls 28 → 5 · wall 97s → 39s.
Start where you are
Two ways in: point a coding agent at the bundled MCP server, or pull the substrate straight into a Rust build.
oxcode·wire a coding agent
The server is a subcommand of the single binary, and the same PageRank-curated context arrives in one call.
Install
From crates.io, or a prebuilt binary for mac, linux, or windows.
cargo install oxcode-cli# no Rust toolchain? prebuilt:curl --proto '=https' --tlsv1.2 -LsSf \https://github.com/oxgraph/oxcode/releases/latest/download/oxcode-cli-installer.sh | shIndex and ask
A native OxGraph database, built from source. Re-runs are O(change).
oxcode index --path .# curated context, one commandoxcode context "How does entry reach helper?" --path .Wire the MCP server
One JSON block for any MCP-capable agent. On Claude Code, the plugin ships it.
{ "mcpServers": { "oxcode": {"command": "oxcode", "args": ["mcp"] } } }# on Claude Code, two commands/plugin marketplace add oxgraph/oxgraph/plugin install oxcode@oxgraph
oxgraph·build on the substrate
Depend on the umbrella crate and turn on the features you need. Default features are empty — a feature is the only thing that pulls a layer in, so you compile only what you use.
# add the substrate, pick the# layers you needcargo add oxgraph \--features csr,algo-std# default features are empty