The RDF toolkit for Rust is a set of crates providing the ability to work with RDF data. The goal is to provide a consistent set of tools for reading and writing files, manipulating models programmatically, and working with graph (triple) stores.
Note that, in terms of implementation, the primary goals of the RDFtk project is to provide a consistent and complete set of crates for handling RDF data. To this end the crates will value readability and usability over runtime optimization (either memory, or speed) at this time. Getting the right interface will be the primary aim with those optimizations coming as necessary.
More documentation may be found in the RDFtk Book.
For contributors, please read our contribution guidelines and code of conduct.
The following set of crates are included in this repository (and Rust workspace), they are not yet complete and will probably be joined by others over time.
This crate provides the core RDF data model; concrete implementations for Statement
s and Literal
s, along with a Resource
type that provides a builder-like experience for models.
This crate provides traits for reading and writing Statement
s and Graph
s as well as implementations of these for common representations.
This crate provides an implementation of the IRI
and URI
specifications.
This crate provides a set of modules that contain the IRI
s and QName
strings for commonly used vocabularies. It also provides macro support for defining new namespaces in the same style as this library.
This crate provides a data model for creating ontologies using RDF Schema and OWL 2 Web Ontology Language (OWL).
This crate provides a placeholder for a query APIs and the SPARQL Query Language for RDF support.
A data model with RDF support for the Simple Knowledge Organization System (SKOS) vocabulary.
The following diagram shows the crate dependencies.
┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
┌─────────────────────────────────────────┐ │
│ │ │
▼ │ │
│ ┌──────────────┐ ┌──────────────┐ ┌───────┴──────┐
│ │ │ │ │ │ │
│ │ iri │◀────│ core │────▶│ names │
│ │ │ │ │ │ │
│ └──────────────┘ └──────────────┘ └──────────────┘
─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘
▲ ▲ ▲ ▲ ▲
┌────────────┘ │ │ │ └────────────┐
┌───────┴──────┐ ┌───────┴──────┐ ┌───────┴──────┐ ┌───────┴──────┐ ┌───────┴──────┐
│ │ │ │ │ │ │ │ │ │
│ io │ │ │ │ ontology │ │ query │ │ skos │
│ │ │ │ │ │ │ │ │ │
└──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘ └───────┬──────┘
▲ ▲ │
│ │ │
└────────────────┴──────────────────────────────────────────────────┘