Pierre-Antoine Champin (Univ. de Lyon – UCBL – LIRIS)
Developers Track – The Web Conf 2020
“Rust emphasizes performance”
“Rust emphasizes reliability”
i.e. memory-safe, thread-safe
Handled by Rust at compile time
Zero-cost abstraction for RDF
with default implementations
* currently a concrete type, but may become a trait soon
Parse | Serialize | |
---|---|---|
RDF/XML | ✔ | |
N-Triples | ✔ | ✔ |
N-Quads | ✔ | ✔ |
Turtle | ✔ | 🚧 |
TriG | ✔ | |
JSON-LD | 🚧 | ✔* |
* expanded form only, v0.5.0
Thank you for your attention
Any question?
let mut graph: FastGraph =
parser::turtle::parse_str(some_ttl).collect_triples();
let ex = Namespace::new("http://example.org/")?;
let foaf = Namespace::new("http://xmlns.com/foaf/0.1/")?;
graph.insert(
&ex.get("bob")?,
&foaf.get("knows")?,
&ex.get("alice")?,
)?;
let mut nts = NtSerializer::new_stringifier();
let example2 = nts.serialize_graph(&mut graph)?.as_str();
println!("The resulting graph\n{}", example2);
Sophia's generalized RDF model:
* actually any term can occupy any role