2 releases
| new 0.1.0-beta.1 | Nov 16, 2025 |
|---|---|
| 0.1.0-alpha.3 | Oct 12, 2025 |
| 0.1.0-alpha.2 |
|
| 0.1.0-alpha.1 |
|
#543 in Science
240 downloads per month
Used in 4 crates
(3 directly)
7MB
149K
SLoC
OxiRS SHACL ๐
Status: Beta Release (v0.1.0-beta.1) - Released November 16, 2025
โจ Beta Software: 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-beta.1"
oxirs-core = "0.1.0-beta.1"
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:
- W3C SHACL test suite compliance - Help fix failing tests
- Performance optimization - Constraint evaluation improvements
- API stabilization - Builder patterns and error handling
- 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 either of Apache License, Version 2.0 or MIT license at your option.
๐ 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
Dependencies
~150MB
~2.5M SLoC