Skip to content

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.

SNAPSHOT · BYTES7f45c301a800d25eview · zero copyvalidateviewtraverse

bytes → validate → view → traverse

Headline numbers

oxgraph
O(change)

incremental reindex — a 1-file edit writes a 2.8 MiB delta, not the 282 MiB database

oxcode
20

languages indexed on a single pipeline

oxgraph
0

unsafe in the substrate (unsafe_code = forbid)

oxcode
−74%

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.

  1. 03
    oxcodereads through the engine

    20-language indexing · agent navigation · oxcode mcp

  2. 02
    oxgraph-dban OxGraph-native database

    embedded engine · catalogs · OxQL · durable identity

  3. 01
    oxgraph substratethe foundation

    topology · layouts · snapshots · algorithms

oxgraph·the substrate

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 in

Foundation

no_std
  • oxgraph-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 slices
  • oxgraph-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

tiered
  • oxgraph-algoBFS and PageRank with no_std, alloc, and std tiers.
  • oxgraph-propertyArrow-backed named, typed property layers.

Built on top

engine
  • oxgraph-dbEmbedded OxGraph-native database: catalogs, queries, durable identity.
  • oxgraph-postgresPostgres-backed engine over the same vocabulary.
oxcode·the first product

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 recognized

High-fidelity

hand-written

Hand-written extractors that resolve receiver-typed method calls, qualified names, and imports precisely.

RustGoTypeScriptJavaScript

Query-driven

generic engine

One tree-sitter query and profile per language. Symbols, span-nested containment, and approximate call edges, without receiver typing.

PythonJavaCC++C#PHPRubySwiftKotlinScalaDartLuaLuauObjective-CPascal

Embedded script

script-in-markup

oxcode 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.

SvelteVue

Recognized

skipped, not dropped

Detected and reported rather than silently ignored. Symbol extraction is a follow-up.

Liquid

CLI commands

contextsymbolsfilessymbolcallscallersqueryindexstatuslanguagesmcp

MCP tools

oxcode_watchoxcode_exploreoxcode_searchoxcode_callersoxcode_calleesoxcode_symboloxcode_filesoxcode_status
measured 2026-06-10 · release build · idle 16-core

The 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
Metricon 0.4.0Change
Cold index4,717 ms~8% faster
Reindex, no change66 msflat
Incremental reindex (1-file edit)1,410 msflat
Symbol query (p50)395 msflat
Database size282.2 MiBflat
Delta-log written per edit reindex2.8 MiBO(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.

ArmQualityTokensCostTool callsWall
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.

  1. 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 | sh
  2. Index and ask

    A native OxGraph database, built from source. Re-runs are O(change).

    oxcode index --path .
    # curated context, one command
    oxcode context "How does entry reach helper?" --path .
  3. 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 oxgraph
# add the substrate, pick the
# layers you need
cargo add oxgraph \
--features csr,algo-std
# default features are empty