Skip to content

Rust-native, modular platform for Semantic Web, SPARQL 1.2, GraphQL, and AI-augmented reasoning

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

cool-japan/oxirs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

OxiRS

A Rust-native, modular platform for Semantic Web, SPARQL 1.2, GraphQL, and AI-augmented reasoning

Rust License: MIT/Apache-2.0 Version

Status: Alpha Release (v0.1.0-alpha.2) - Released October 4, 2025

⚠️ Alpha Software: This is an early alpha release. APIs may change without notice. Not recommended for production use.

Vision

OxiRS aims to be a Rust-first, JVM-free alternative to Apache Jena + Fuseki and to Jupiper, providing:

  • Protocol choice, not lock-in: Expose both SPARQL 1.2 and GraphQL endpoints from the same dataset
  • Incremental adoption: Each crate works stand-alone; opt into advanced features via Cargo features
  • AI readiness: Native integration with vector search, graph embeddings, and LLM-augmented querying
  • Single static binary: Match or exceed Jena/Fuseki feature-for-feature while keeping a <50MB footprint

Quick Start

Installation

# Install the CLI tool
cargo install oxirs

# Or build from source
git clone https://github.com/cool-japan/oxirs.git
cd oxirs
cargo build --workspace --release

Usage

# Initialize a new knowledge graph (alphanumeric, _, - only)
oxirs init mykg

# Import RDF data (automatically persisted to mykg/data.nq)
oxirs import mykg data.ttl --format turtle

# Query the data (loaded automatically from disk)
oxirs query mykg "SELECT * WHERE { ?s ?p ?o } LIMIT 10"

# Query with specific patterns
oxirs query mykg "SELECT ?name WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name }"

# Start the server
oxirs serve mykg/oxirs.toml --port 3030

Features:

  • βœ… Persistent storage: Data automatically saved to disk in N-Quads format
  • βœ… SPARQL queries: SELECT, ASK, CONSTRUCT, DESCRIBE supported
  • βœ… Auto-load: No manual save/load needed
  • 🚧 PREFIX support: Coming in next release

Open:

Published Crates

All crates are published to crates.io and documented on docs.rs.

Core

Crate Version Docs Description
oxirs-core Crates.io docs.rs Core RDF and SPARQL functionality

Server

Crate Version Docs Description
oxirs-fuseki Crates.io docs.rs SPARQL 1.1/1.2 HTTP server
oxirs-gql Crates.io docs.rs GraphQL endpoint for RDF

Engine

Crate Version Docs Description
oxirs-arq Crates.io docs.rs SPARQL query engine
oxirs-rule Crates.io docs.rs Rule-based reasoning
oxirs-shacl Crates.io docs.rs SHACL validation
oxirs-star Crates.io docs.rs RDF-star support
oxirs-ttl Crates.io docs.rs Turtle parser
oxirs-vec Crates.io docs.rs Vector search

Storage

Crate Version Docs Description
oxirs-tdb Crates.io docs.rs TDB2-compatible storage
oxirs-cluster Crates.io docs.rs Distributed clustering

Stream

Crate Version Docs Description
oxirs-stream Crates.io docs.rs Real-time streaming
oxirs-federate Crates.io docs.rs Federated queries

AI

Crate Version Docs Description
oxirs-embed Crates.io docs.rs Knowledge graph embeddings
oxirs-shacl-ai Crates.io docs.rs AI-powered SHACL
oxirs-chat Crates.io docs.rs RAG chat API

Tools

Crate Version Docs Description
oxirs (CLI) Crates.io docs.rs CLI tool

Architecture

oxirs/                  # Cargo workspace root
β”œβ”€ core/                # Thin, safe re-export of oxigraph
β”‚  └─ oxirs-core
β”œβ”€ server/              # Network front ends
β”‚  β”œβ”€ oxirs-fuseki      # SPARQL 1.1/1.2 HTTP protocol, Fuseki-compatible config
β”‚  └─ oxirs-gql         # GraphQL faΓ§ade (Juniper + mapping layer)
β”œβ”€ engine/              # Query, update, reasoning
β”‚  β”œβ”€ oxirs-arq         # Jena-style algebra + extension points
β”‚  β”œβ”€ oxirs-rule        # Forward/backward rule engine (RDFS/OWL/SWRL)
β”‚  β”œβ”€ oxirs-shacl       # SHACL Core + SHACL-SPARQL validator
β”‚  β”œβ”€ oxirs-star        # RDF-star / SPARQL-star grammar support
β”‚  └─ oxirs-vec         # Vector index abstractions (SciRS2, hnsw_rs)
β”œβ”€ storage/
β”‚  β”œβ”€ oxirs-tdb         # MVCC layer & assembler grammar (TDB2 parity)
β”‚  └─ oxirs-cluster     # Raft-backed distributed dataset
β”œβ”€ stream/              # Real-time and federation
β”‚  β”œβ”€ oxirs-stream      # Kafka/NATS I/O, RDF Patch, SPARQL Update delta
β”‚  └─ oxirs-federate    # SERVICE planner, GraphQL stitching
β”œβ”€ ai/
β”‚  β”œβ”€ oxirs-embed       # KG embeddings (TransE, ComplEx…)
β”‚  β”œβ”€ oxirs-shacl-ai    # Shape induction & data repair suggestions
β”‚  └─ oxirs-chat        # RAG chat API (LLM + SPARQL)
└─ tools/
    β”œβ”€ oxirs             # CLI (import, export, star-migrate, bench)
    └─ benchmarks/       # SP2Bench, WatDiv, LDBC SGS

Feature Matrix (v0.1.0-alpha.2)

Capability Oxirs crate(s) Status Jena / Fuseki parity
RDF 1.2 & syntaxes oxirs-core βœ… Alpha βœ…
RDF-star parse/serialise oxirs-star πŸ”„ Experimental πŸ”Έ (Jena dev build)
SPARQL 1.1 Query & Update oxirs-fuseki + oxirs-arq βœ… Alpha βœ…
SPARQL 1.2 / SPARQL-star oxirs-arq (star flag) πŸ”„ Experimental πŸ”Έ
Rule reasoning (RDFS/OWL) oxirs-rule πŸ”„ Experimental βœ…
SHACL Core+API oxirs-shacl πŸ”„ Experimental βœ…
Full-text search (text:) oxirs-textsearch ⏳ Planned βœ…
GeoSPARQL oxirs-geosparql (geo) ⏳ Planned βœ…
GraphQL API oxirs-gql βœ… Alpha ❌
Vector search / embeddings oxirs-vec, oxirs-embed (ai) πŸ”„ Experimental ❌
Distributed / HA store oxirs-cluster (cluster) πŸ”„ Experimental πŸ”Έ (Jena + external)

Legend: βœ… Alpha - Usable but may have bugs, πŸ”„ Experimental - Under development, ⏳ Planned - Not yet implemented, πŸ”Έ partial/plug-in

Usage Examples

Dataset Configuration (TOML)

[dataset.mykg]
type      = "tdb2"
location  = "/data"
text      = { enabled = true, analyzer = "english" }
shacl     = ["./shapes/person.ttl"]

GraphQL Query (auto-generated)

query {
  Person(where: {familyName: "Yamada"}) {
    givenName
    homepage
    knows(limit: 5) { givenName }
  }
}

Vector Similarity SPARQL Service (opt-in AI)

SELECT ?s ?score WHERE {
  SERVICE <vec:similar ( "LLM embeddings of 'semantic web'" 0.8 )> {
    ?s ?score .
  }
}

Development

Prerequisites

  • Rust 1.70+ (MSRV)
  • Optional: Docker for containerized deployment

Building

# Clone the repository
git clone https://github.com/cool-japan/oxirs.git
cd oxirs

# Build all crates
cargo build --workspace

# Run tests
cargo nextest run --no-fail-fast

# Run with all features
cargo build --workspace --all-features

Feature Flags

Optional features to keep dependencies minimal:

  • geo: GeoSPARQL support
  • text: Full-text search with Tantivy
  • ai: Vector search and embeddings
  • cluster: Distributed storage with Raft
  • star: RDF-star and SPARQL-star support
  • vec: Vector index abstractions

Contributing

We welcome contributions! Please see our Contributing Guide for details.

RFC Process

  • Design documents go in ./rfcs/ with lazy-consensus and 14-day comment window
  • All code must pass rustfmt + nightly 2025-06, Clippy --all-targets --workspace -D warnings
  • Commit sign-off required (DCO 1.1)

Roadmap

Version Target Date Milestone Deliverables
v0.1.0-alpha.2 βœ… Oct 2025 Alpha Enhancements Persistent storage, CLI parity, federation, observability
v0.1.0-beta.1 Dec 2025 Beta Release API stability, production hardening, full docs
v0.2.0 Q1 2026 Enhanced Features Advanced optimization, AI capabilities, clustering
v0.3.0 Q2 2026 Text & Geo Full-text search, GeoSPARQL, bulk loader
v0.4.0 Q3 2026 AI & Streaming Vector search, embeddings, RAG, streaming
v1.0.0 Q4 2026 Production Ready Full Jena parity, enterprise support, LTS

License

OxiRS is dual-licensed under either:

at your option.

See LICENSE for details.

Contact

Release Notes (v0.1.0-alpha.2)

πŸ“„ Full notes live in docs/releases/0.1.0-alpha.2.md.

Highlights

  • βš™οΈ Persistent RDF pipeline: Automatic on-disk save/load in N-Quads, streaming import/export/migrate flows, and configurable parallel batch ingestion
  • 🧠 Interactive SPARQL tooling: Full-featured CLI REPL with history search, templates, syntax hints, SELECT */wildcard fixes, and multi-line editing
  • 🌐 Federated querying: SPARQL 1.1 SERVICE support with retries, SERVICE SILENT, JSON results merging, and verified interoperability with DBpedia/Wikidata
  • πŸ” Production safeguards: OAuth2/OIDC + JWT, seven security headers, HSTS, structured logging, and Prometheus metrics with slow-query tracing
  • πŸš€ Performance improvements: SIMD-accelerated SciRS2 operators, streaming pipelines, and 3,750+ tests (including 7 integration suites) covering the new workflow

Known Issues

  • Large dataset (>100M triples) performance work continues; benchmark feedback is appreciated
  • AI-centric crates (oxirs-chat, oxirs-embed, oxirs-shacl-ai) remain experimental and may change without notice
  • Documentation for advanced serialization scenarios is still being expanded

Upgrade Notes

  • Install the new CLI with cargo install oxirs --version 0.1.0-alpha.2 or update individual crates via Cargo.toml
  • Existing dataset directories from alpha.1 remain compatible; the new persistence layer will automatically detect and upgrade saved N-Quads data
  • Outbound HTTP access is required for federation; configure firewall rules and timeouts before enabling cross-endpoint queries

Prior Release (v0.1.0-alpha.1)

Focused on delivering the initial SPARQL/GraphQL server, native RDF parsing, experimental AI modules, and eliminating the upstream OxiGraph dependency. See the changelog for the full breakdown.


"Rust makes memory safety table stakes; Oxirs makes knowledge-graph engineering table stakes."

Second alpha release - October 4, 2025

Packages

No packages published

Languages