Thanks to visit codestin.com
Credit goes to github.com

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

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

OxiRS

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

License: MIT/Apache-2.0 Version

Status: Alpha Release (v0.1.0-alpha.3) - Released October 12, 2025

⚠️ Alpha Software: This is an early alpha release. APIs may change without notice. Suitable for production alpha testing and internal applications.

Vision

OxiRS aims to be a Rust-first, JVM-free alternative to Apache Jena + Fuseki and to Juniper, 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 --version 0.1.0-alpha.3

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

What’s New in v0.1.0-alpha.3 (October 12, 2025)

  • Query Intelligence: oxirs explain introduces PostgreSQL-style plans with analyze/full modes, complexity scoring, and optimization hints for SPARQL workloads.
  • Reusable SPARQL Templates: Nine parameterizable templates (basic, federation, analytics, property paths) now ship with the CLI for faster queries.
  • Persistent Query History: Automatic tracking, replay, search, and statistics for every CLI query, stored under ~/.local/share/oxirs/query_history.json.
  • Industry 4.0 SAMM tooling: Six new generators (GraphQL, TypeScript, Python, Java, Scala, SQL) plus AAS pipelines deliver 16 total codegen targets.
  • Enterprise Quality Bar: Workspace-wide -D warnings enforcement, 200+ Clippy fixes, and 4,421 tests ensure a clean alpha-grade 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-samm Crates.io docs.rs SAMM metamodel & AAS
oxirs-geosparql Crates.io docs.rs GeoSPARQL support
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-samm        # SAMM metamodel + AAS integration (Industry 4.0)
β”‚  β”œβ”€ oxirs-geosparql   # GeoSPARQL spatial queries and topological relations
β”‚  β”œβ”€ oxirs-shacl       # SHACL Core + SHACL-SPARQL validator
β”‚  β”œβ”€ oxirs-star        # RDF-star / SPARQL-star grammar support
β”‚  β”œβ”€ oxirs-ttl         # Turtle/TriG parser and serializer
β”‚  └─ 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.3)

Capability Oxirs crate(s) Status Jena / Fuseki parity
Core RDF & SPARQL
RDF 1.2 & syntaxes (7 formats) oxirs-core βœ… Alpha (519 tests) βœ…
SPARQL 1.1 Query & Update oxirs-fuseki + oxirs-arq βœ… Alpha (466 tests) βœ…
SPARQL 1.2 / SPARQL-star oxirs-arq (star flag) βœ… Alpha πŸ”Έ
Persistent storage (N-Quads) oxirs-core βœ… Alpha βœ…
Semantic Web Extensions
RDF-star parse/serialise oxirs-star βœ… Alpha (157 tests) πŸ”Έ (Jena dev build)
SHACL Core+API (W3C compliant) oxirs-shacl βœ… Alpha (344 tests, 27/27 W3C) βœ…
Rule reasoning (RDFS/OWL) oxirs-rule βœ… Alpha (170 tests) βœ…
SAMM 2.0-2.3 & AAS (Industry 4.0) oxirs-samm βœ… Alpha (16 generators) ❌
Query & Federation
GraphQL API oxirs-gql βœ… Alpha (118 tests) ❌
SPARQL Federation (SERVICE) oxirs-federate βœ… Alpha (285 tests, 2PC) βœ…
Federated authentication oxirs-federate βœ… Alpha (OAuth2/SAML/JWT) πŸ”Έ
Real-time & Streaming
Stream processing (Kafka/NATS) oxirs-stream βœ… Alpha (214 tests, SIMD) πŸ”Έ (Jena + external)
RDF Patch & SPARQL Update delta oxirs-stream βœ… Alpha πŸ”Έ
Search & Geo
Full-text search (text:) oxirs-textsearch ⏳ Planned βœ…
GeoSPARQL (OGC 1.1) oxirs-geosparql (geo) βœ… Alpha (183 tests) βœ…
Vector search / embeddings oxirs-vec (323 tests), oxirs-embed (296 tests) βœ… Alpha ❌
Storage & Distribution
TDB2-compatible storage oxirs-tdb βœ… Alpha (193 tests) βœ…
Distributed / HA store (Raft) oxirs-cluster (cluster) βœ… Alpha πŸ”Έ (Jena + external)
AI & Advanced Features
RAG chat API (LLM integration) oxirs-chat βœ… Alpha ❌
AI-powered SHACL validation oxirs-shacl-ai βœ… Alpha (278 tests) ❌

Legend:

  • βœ… Alpha: Usable with 100+ tests, may have bugs, suitable for alpha testing
  • πŸ”„ Experimental: Under active development, APIs unstable
  • ⏳ Planned: Not yet implemented
  • πŸ”Έ Partial/plug-in support in Jena

Quality Metrics (v0.1.0-alpha.3):

  • 4,421 tests passing (99.98% pass rate)
  • Zero compilation warnings (enforced with -D warnings)
  • 200+ clippy lints fixed
  • 7/7 integration tests passing

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 Status
v0.1.0-alpha.1 βœ… Sep 30, 2025 Initial Alpha Core RDF/SPARQL, GraphQL, AI modules foundation βœ… Released
v0.1.0-alpha.2 βœ… Oct 4, 2025 Alpha Enhancements Persistent storage, CLI parity, federation, observability βœ… Released
v0.1.0-alpha.3 βœ… Oct 12, 2025 SAMM & Quality Industry 4.0 (16 generators), zero-warning compilation, 4,421 tests βœ… Released
v0.1.0-beta.1 Dec 2025 Beta Release API stability, production hardening, 95%+ test coverage, full docs 🎯 Next
v0.2.0 Q1 2026 Performance Query optimization (10x), AI production-ready, multi-region clustering πŸ“‹ Planned
v0.3.0 Q2 2026 Search & Geo Full-text search (Tantivy), GeoSPARQL, bulk loader, performance SLAs πŸ“‹ Planned
v1.0.0 Q4 2026 Production Ready Full Jena parity verified, enterprise support, LTS guarantees πŸ“‹ Planned

Alpha.3 Achievements (October 12, 2025)

SAMM & AAS Integration:

  • βœ… 16 code generators (GraphQL, TypeScript, Python, Java, Scala, SQL, OpenAPI, AsyncAPI, HTML, JSON Schema, Markdown, Rust, AAS, Turtle, Sample, Diagram)
  • βœ… 100% Java ESMF SDK command coverage (19/19 commands)
  • βœ… AAS to SAMM conversion pipeline (XML/JSON/AASX support)
  • βœ… Package management with namespace sharing

Federation & Distribution:

  • βœ… oxirs-federate: 100% Beta Release targets achieved in alpha.3
  • βœ… Distributed transactions (2PC, Saga pattern, eventual consistency)
  • βœ… Multi-provider authentication (OAuth2, SAML, JWT, API keys)
  • βœ… OpenTelemetry integration with circuit breakers

Code Quality Excellence:

  • βœ… Zero-warning compilation enforced (-D warnings)
  • βœ… 200+ clippy lints fixed across 13+ crates
  • βœ… 4,421 tests passing (99.98% pass rate, 88.8s execution)
  • βœ… SHACL: 100% W3C compliance (27/27 constraints, 344 tests)

Production Features:

  • βœ… Performance module (caching, profiling, batch processing)
  • βœ… Template engine with custom filters
  • βœ… Metrics, health checks, structured logging

GeoSPARQL & Spatial Features:

  • βœ… OGC GeoSPARQL 1.1 compliance (183 tests)
  • βœ… R-tree spatial indexing with stress tests (50k points)
  • βœ… Performance optimization module (parallel, streaming for large datasets)
  • βœ… Simple Features, Egenhofer-9, RCC-8 topological relations
  • βœ… WKT/GML parsing, CRS transformations (PROJ integration)
  • βœ… Comprehensive spatial queries (bbox, within-distance, k-NN)

Next Milestone: Beta.1 (December 2025)

Beta.1 Features Already Complete in Alpha.3: πŸŽ‰

  • βœ… Production Hardening - oxirs-core, oxirs-arq, oxirs-fuseki
    • Circuit breakers for fault tolerance
    • Performance monitoring with latency statistics
    • Resource quotas and rate limiting
    • Health checks for all components
    • Comprehensive benchmarking suites (17 benchmark groups total)
    • Stress testing suites (20 comprehensive tests total)

Remaining Focus Areas:

  • 🎯 API stability and versioning guarantees
  • 🎯 Production performance benchmarking (validate 10x claims)
  • 🎯 Security audit and hardening
  • 🎯 Comprehensive documentation (95%+ coverage)
  • 🎯 Test coverage increase to 95%+
  • 🎯 Migration guides and examples
  • 🎯 Performance SLAs and optimization

License

OxiRS is dual-licensed under either:

at your option.

See LICENSE for details.

Contact

Release Notes (v0.1.0-alpha.3)

πŸ“„ Full notes live in CHANGELOG.md.

Highlights

  • 🏭 SAMM & AAS Integration: Industry 4.0 digital twin support with SAMM (Semantic Aspect Meta Model) 2.0.0-2.3.0 parser and bidirectional AAS (Asset Administration Shell) conversion
  • 🎨 16 Code Generators: GraphQL, TypeScript, Python, Java, Scala, Rust, SQL, OpenAPI, AsyncAPI, HTML, JSON Schema, Markdown, and more
  • πŸ”„ Java ESMF SDK Compatible: Drop-in replacement syntax (samm β†’ oxirs) for seamless migration from Java tooling
  • βš™οΈ 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 4,421+ tests (including 7 integration suites) covering the new workflow
  • ✨ Code quality: Zero-warning compilation enforced with -D warnings across all 21 crates - 200+ clippy lints fixed

Known Issues

  • Large dataset (>100M triples) performance optimization continues; benchmark feedback appreciated
  • AI-centric crates (oxirs-chat, oxirs-embed, oxirs-shacl-ai) remain experimental
  • Advanced serialization documentation being expanded

Quality Metrics (v0.1.0-alpha.3)

  • βœ… Zero warnings - Strict -D warnings enforced across all 21 crates
  • βœ… 4,421 tests passing - 99.98% pass rate (88.8s execution time)
  • βœ… 200+ clippy lints fixed - Comprehensive code quality improvements
  • βœ… 7/7 integration tests passing - Complete RDF pipeline validated

Upgrade Notes

  • Install the new CLI with cargo install oxirs --version 0.1.0-alpha.3 or update individual crates via Cargo.toml
  • Breaking change: CLI syntax updated to match Java ESMF SDK - replace oxirs samm with oxirs aspect (see CHANGELOG.md for migration guide)
  • New oxirs aas command for AAS integration (XML/JSON/AASX support)
  • Existing dataset directories from alpha.1/alpha.2 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

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

Third alpha release - October 12, 2025

Packages

No packages published

Languages