同一张 RDF 图,同一套行为
PurRDF is a from-scratch RDF 1.2 toolkit built around a dependency-light Rust core and carried into Python, WebAssembly/JavaScript, and C. It covers graph primitives, native codecs, RDFC-1.0 canonicalization, SPARQL, SHACL, slice metadata, and GTS graph transport.
The goal is semantic consistency across runtimes. A graph moved from a Rust service to a Python pipeline to a browser should not quietly change behavior because each language chose a different RDF interpretation.
Why PurRDF?
RDF tooling fragments across languages and across standard generations. Every ecosystem has its own parser, serializer, store model, and edge-case behavior, while RDF 1.2 adds triple terms, reifiers, and base-direction literals that many incumbent libraries do not carry yet.
PurRDF keeps those semantics in one core. The Rust implementation is the behavioral center; bindings and package surfaces expose that same engine rather than reimplementing the graph model per language.
What's inside
| Layer | What PurRDF provides |
|---|---|
| RDF 1.2 primitives | Interned dataset IR, triple terms, reifier side tables, and base-direction literals. |
| Native codecs | Turtle, TriG, N-Triples, N-Quads, RDF/XML, JSON-LD star, and YAML-LD parsing/serialization. |
| Canonicalization | W3C RDFC-1.0 dataset canonicalization with fixture-backed tests. |
| SPARQL | SPARQL 1.1/1.2 parser, algebra, multiset evaluator, result formats, property paths, aggregates, and SERVICE hooks. |
| SHACL | Native SHACL Core validation plus scoped SHACL 1.2 draft support for reifier shapes. |
| GTS transport | Single-file, content-addressed graph transport using CBOR segments, BLAKE3 chains, and optional COSE signing/encryption. |
| Slices and provenance | Manifested slice catalogs, content-addressed artifact IDs, RDF/GTS loss ledger, SSSOM support, and FnO function-catalog codec. |
Install
| Runtime | Package | Install |
|---|---|---|
| Rust | purrdf | cargo add purrdf |
| Python | purrdf | pip install purrdf |
| JavaScript / WebAssembly | @blackcatinformatics/purrdf | npm i @blackcatinformatics/purrdf |
| C | libpurrdf | make capi-build from the source checkout |
Interfaces
The public facade starts with purrdf for Rust, while lower-level crates split the kernel, RDF codecs, GTS, SPARQL, SHACL, slices, IRIs, XSD values, WebAssembly, and C ABI. The Python package also ships an rdflib compatibility layer and graph export paths for SQLite, DuckDB, and Parquet. The JavaScript package exposes an RDF/JS-shaped DataFactory, Dataset, and stream surface over the same engine.
cargo add purrdf
pip install purrdf
npm i @blackcatinformatics/purrdf
Conformance
- SPARQL: W3C SPARQL 1.1 conformance harness through
purrdf-sparql-conformance. - SHACL: SHACL Core conformance corpus, with parity checks against pySHACL in no-inference mode.
- RDFC-1.0: W3C canonicalization fixtures.
- GTS: frozen byte-exact cross-language vectors in the source repository.
Development gates are exposed in the upstream repository as make metadata, make check, and make bench.
Place in the GMEOW family
PurRDF is the library layer under GMEOW, Blackcat Informatics' reasoning-centric ontology and grounded-memory publication stack. It also hosts the Rust GTS engine; GTS remains the graph-transport format and project surface.
Publication facts
| Title | PurRDF: RDF 1.2 Toolkit |
|---|---|
| DOI | 10.67342/pkg8gpp4no/v1 |
| Type | Software project and technical publication surface |
| Project version | 0.1.1 |
| Released | |
| Publisher | 黑猫信息科技 |
| License | MIT OR Apache-2.0 |
| Repository | https://github.com/Blackcat-Informatics/purrdf |
| Citation metadata | https://blackcatinformatics.ca/purrdf/cite.csl.json |
Citation: PurRDF: RDF 1.2 Toolkit. Publication version 1; package version 0.1.1. Blackcat Informatics Inc., 2026. DOI: 10.67342/pkg8gpp4no/v1. Source: https://github.com/Blackcat-Informatics/purrdf.