Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Feature flags

The umbrella crate's default feature set is empty. A feature is the only thing that pulls a layer in, so you compile only what you use:

cargo add oxgraph --features csr,algo-std

Features to layers

FeaturePulls in
topologyCore capability traits for discrete topology.
graphBinary graph vocabulary: nodes, edges, directed traversal.
hyperHypergraph vocabulary: vertices, hyperedges, participants.
csrCompressed-sparse-row graph views over slices.
cscInbound (compressed-sparse-column) views for reverse traversal.
hyper-bcsrDirected bipartite-CSR hypergraph views.
snapshotRead and validate snapshots (no_std, no allocation).
snapshot-allocBuild snapshots (adds alloc).
algo, algo-alloc, algo-stdBFS and PageRank at the matching allocation tier.
graph-build, hyper-buildAppend/freeze builders that produce a layout, then a snapshot.
property-arrowArrow-backed named, typed property layers.
dbThe embedded database (oxgraph-db).
postgresThe Postgres-backed engine (also enables csc).
fullEverything.

Each feature corresponds to a crate in the crate family; you can also depend on those crates directly if you want a tighter dependency graph.

Allocation tiers

Several layers ship at no_std, alloc, and std tiers, so you only pull in an allocator (or std) when your target allows it. oxgraph-algo is the clearest example:

TierFeatureFor
no_stdalgoBare-metal / embedded; you pass in scratch buffers.
allocalgo-allocHeap available, no std.
stdalgo-stdFull standard library.

Snapshots split the same way: snapshot reads and validates without allocating; snapshot-alloc adds the builder.

Borrow, don't parse

Reading a snapshot does not deserialize it. snapshot validates the byte container once and hands back typed slices borrowed straight from the bytes — the bytes → validate → view → traverse pipeline. That is why opening a graph is closer to a memory-map than a parse, and why structures that cross an I/O boundary derive zero-copy layout traits rather than being rebuilt on the heap. See Concepts for the reasoning.