oxirs-shacl 0.1.0

SHACL Core + SHACL-SPARQL validator for RDF data validation
Documentation

OxiRS SHACL ๐Ÿ”

Version License Build Status

Status: Production Release (v0.1.0) - Released January 7, 2026

โœจ 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. Currently in active development with core constraint support implemented.

๐ŸŽฏ Features

โœ… Implemented

  • Core SHACL Constraints - All basic constraint types (class, datatype, cardinality, etc.)
  • Property Path Support - Sequence, alternative, inverse, and Kleene 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
  • Basic Validation Engine - Core validation logic and reporting

๐Ÿšง In Development

  • W3C Test Suite Compliance - Working toward full specification compliance
  • Performance Optimization - Constraint evaluation caching and parallelization
  • SHACL-SPARQL Extensions - Advanced SPARQL-based constraints
  • Validation Reports - Multiple output formats and detailed violation information
  • API Stabilization - Builder patterns and comprehensive error handling

๐Ÿ”ฎ Planned

  • Streaming Validation - Real-time validation for RDF streams
  • Enterprise Features - Analytics, security hardening, and federation support
  • Integration Tools - CLI utilities and ecosystem integration

๐Ÿš€ Quick Start

Add to your Cargo.toml:

[dependencies]
oxirs-shacl = "0.1.0"
oxirs-core = "0.1.0"

Basic Usage

โš ๏ธ Note: API is still under development and subject to change.

use oxirs_shacl::{ValidationEngine, ValidationConfig, Shape};
use oxirs_core::store::Store;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // This example shows the intended API - implementation in progress
    
    // Create shapes and validation configuration
    let shapes = vec![/* shapes loaded from RDF */];
    let config = ValidationConfig::default();
    
    // Create validation engine
    let engine = ValidationEngine::new(&shapes, config);
    
    // Create and populate RDF store
    let store = Store::new()?;
    // store.load_from_reader(...)?;
    
    // Validate data (API under development)
    // let report = engine.validate_store(&store)?;
    
    Ok(())
}

For current implementation details, see the source code and tests.

๐Ÿ—๏ธ Current Development Status

This crate is actively under development. The core constraint types and validation engine architecture are implemented, but the public API is still being finalized.

Implementation Progress

  • โœ… Core constraint types (class, datatype, cardinality, range, string, etc.)
  • โœ… Property path evaluation engine
  • โœ… Logical constraints (and, or, not, xone)
  • โœ… Basic validation engine architecture
  • ๐Ÿšง W3C SHACL test suite compliance
  • ๐Ÿšง Public API stabilization
  • ๐Ÿšง Performance optimization
  • ๐Ÿ”ฎ SHACL-SPARQL extensions
  • ๐Ÿ”ฎ Comprehensive validation reports

๐Ÿงช Development & Testing

Running Tests

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

# Run with all features
cargo nextest run --all-features --no-fail-fast

# Run specific modules
cargo test constraints
cargo test validation

Code Quality

# Lint code (following "no warnings policy")
cargo clippy --workspace --all-targets -- -D warnings

# Format code
cargo fmt --all -- --check

# Generate documentation
cargo doc --no-deps --open

Building from Source

git clone https://github.com/cool-japan/oxirs.git
cd oxirs/engine/oxirs-shacl
cargo build --release

Running Benchmarks

cargo bench

๐Ÿค Contributing

This crate is under active development. Contributions are welcome! Current priorities:

  1. W3C SHACL test suite compliance - Help fix failing tests
  2. Performance optimization - Constraint evaluation improvements
  3. API stabilization - Builder patterns and error handling
  4. Documentation - Examples and API documentation

Development Setup

  1. Install Rust (latest stable)
  2. Clone the repository
  3. Run cargo nextest run --no-fail-fast to verify setup
  4. Make your changes following the "no warnings policy"
  5. Run cargo clippy --workspace --all-targets -- -D warnings
  6. Run cargo fmt --all
  7. Submit a pull request

๐Ÿ“œ License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

๐Ÿ“š Related Projects


Part of the OxiRS ecosystem - High-performance RDF tools for Rust