#rdf

oxrdf

Basic data structures related to RDF

30 releases

Uses new Rust 2024

0.3.1 Oct 11, 2025
0.3.0-beta.2 Aug 7, 2025
0.3.0-beta.1 Jul 20, 2025
0.2.4 Jan 11, 2025
0.1.0 Mar 19, 2022

#343 in Rust patterns

Download history 4459/week @ 2025-08-27 3473/week @ 2025-09-03 3288/week @ 2025-09-10 3883/week @ 2025-09-17 6466/week @ 2025-09-24 4460/week @ 2025-10-01 4153/week @ 2025-10-08 6659/week @ 2025-10-15 5050/week @ 2025-10-22 2702/week @ 2025-10-29 2697/week @ 2025-11-05 3827/week @ 2025-11-12 3001/week @ 2025-11-19 1671/week @ 2025-11-26 2373/week @ 2025-12-03 1973/week @ 2025-12-10

9,680 downloads per month
Used in 145 crates (53 directly)

MIT/Apache

290KB
6.5K SLoC

OxRDF

Latest Version Released API docs Crates.io downloads actions status Gitter

OxRDF is a simple library providing datastructures encoding RDF 1.1 concepts.

This crate is intended to be a basic building block of other crates like Oxigraph or Spargebra.

Support for RDF 1.2 is available behind the rdf-12 feature.

OxRDF is inspired by RDF/JS and Apache Commons RDF.

Use oxrdfio if you need to read or write RDF files.

Usage example:

use oxrdf::*;

let mut graph = Graph::default();

// insertion
let ex = NamedNodeRef::new("http://example.com").unwrap();
let triple = TripleRef::new(ex, ex, ex);
graph.insert(triple);

// simple filter
let results: Vec<_> = graph.triples_for_subject(ex).collect();
assert_eq!(vec![triple], results);

License

This project is licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or <http://www.apache.org/licenses/LICENSE-2.0>)
  • MIT license (LICENSE-MIT or <http://opensource.org/licenses/MIT>)

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Oxigraph by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.6–1.2MB
~24K SLoC