OxiRS SHACL ๐
Status: v0.4.0 - Released 2026-07-19
โจ Production Release: Production-ready with API stability guarantees. Semantic versioning enforced.
A high-performance SHACL (Shapes Constraint Language) validator for RDF data, implemented in Rust as part of the OxiRS ecosystem, with full W3C SHACL Core compliance (27/27 constraint types).
๐ฏ Features
โ Implemented
- SHACL Core - Complete constraint validation: 27/27 W3C constraint types (class, datatype, cardinality, range, string, logical, shape-based, and more)
- Property Path Support - Sequence, alternative, inverse, and Kleene (zero-or-more, one-or-more, zero-or-one) paths
- Logical Constraints - Full support for
sh:and,sh:or,sh:not,sh:xone - Shape-based Constraints - Nested shape validation and qualified cardinality
- Target Selection - Class, node, and property-based targeting, plus SPARQL-based (
sh:target) and single-hop property-path targets that execute against the store - Subclass-Aware Class Targeting - Reflexive+transitive
rdfs:subClassOfclosure (advanced_features::subclass_closure, FloydโWarshall over a boolean adjacency matrix), sosh:classand implicit-class targets honor subclassing instead of exact-type matching only - SHACL-SPARQL / SHACL-AF - SPARQL-based constraints, SPARQL targets, and ASK validators
- W3C Test Suite Compliance - 27/27 W3C SHACL Core constraint types; 47/47 real conformance tests passing
- Performance Optimization - Constraint evaluation caching, parallelization, and incremental validation
- Validation Reports - W3C-compliant violation reports; JUnit, TAP, SARIF, and JSON output for CI/CD integration
- Distributed Validation - Coordinator-worker architecture
- Cross-Module Integration - GraphQL, Fuseki, Stream, and AI modules
- Constraint Component Library - 30+ pre-built validators
- ShEx Migration - ShEx to SHACL migration tool
- LSP Integration - Language Server Protocol support for IDE tooling
- Interactive Designer - Step-by-step shape creation wizard
- API Stability - Public APIs are stable; semantic versioning enforced
๐ฎ Planned
- Streaming Validation - Real-time validation for RDF streams
๐ Quick Start
Add to your Cargo.toml:
[]
= "0.3.2"
= "0.3.2"
Basic Usage
use IndexMap;
use ;
use ;
For more complete, runnable examples, see examples/basic_validation.rs
and examples/parallel_validation.rs, plus the
source code and tests.
๐๏ธ Current Development Status
This crate is production-ready. Core constraint types, the validation engine, and the public API are stable and covered by 2,140 passing tests (--all-features).
Implementation Progress
- โ Core constraint types (class, datatype, cardinality, range, string, etc.)
- โ Property path evaluation engine
- โ Logical constraints (and, or, not, xone)
- โ Validation engine architecture, with SPARQL-based and property-path targets executing against the store
- โ W3C SHACL test suite compliance (27/27 constraint types, 47/47 conformance tests)
- โ Public API stabilization
- โ Performance optimization (caching, parallelization, incremental validation)
- โ SHACL-SPARQL extensions
- โ Comprehensive validation reports (JUnit, TAP, SARIF, JSON)
๐งช Development & Testing
Running Tests
# Run basic tests
# Run with all features
# Run specific modules
Code Quality
# Lint code (following "no warnings policy")
# Format code
# Generate documentation
Building from Source
Running Benchmarks
๐ค Contributing
This crate is production-ready; contributions are still welcome! Current priorities:
- Streaming validation - Real-time validation for RDF streams
- Further W3C SHACL-AF conformance breadth - continued coverage beyond SHACL Core
- Performance optimization - Constraint evaluation improvements
- Documentation - Examples and API documentation
Development Setup
- Install Rust (latest stable)
- Clone the repository
- Run
cargo nextest run --no-fail-fastto verify setup - Make your changes following the "no warnings policy"
- Run
cargo clippy --workspace --all-targets -- -D warnings - Run
cargo fmt --all - Submit a pull request
๐ License
Licensed under the Apache License, Version 2.0.
๐ Related Projects
- oxirs-core - Core RDF data structures and operations
- oxirs-arq - SPARQL query engine
- oxirs-fuseki - SPARQL server
Part of the OxiRS ecosystem - High-performance RDF tools for Rust