8 releases

0.3.1 Jul 4, 2023
0.3.0 Oct 7, 2022
0.2.3 Sep 19, 2022
0.2.0 Jul 25, 2022
0.1.0 Oct 29, 2021

#438 in Parser implementations

Download history 33/week @ 2023-10-21 49/week @ 2023-10-28 42/week @ 2023-11-04 58/week @ 2023-11-11 34/week @ 2023-11-18 65/week @ 2023-11-25 43/week @ 2023-12-02 41/week @ 2023-12-09 33/week @ 2023-12-16 51/week @ 2023-12-23 23/week @ 2023-12-30 29/week @ 2024-01-06 37/week @ 2024-01-13 29/week @ 2024-01-20 35/week @ 2024-01-27 46/week @ 2024-02-03

154 downloads per month
Used in 7 crates (6 directly)

MIT/Apache

120KB
3K SLoC

Harriet

github crates.io docs.rs

Harriet is a parser for the Turtle document format, which is a format "that allows an RDF graph to be completely written in a compact and natural text form".

Installation

Add harriet to your project (assuming cargo-edit is installed) via:

cargo add harriet

Goals

  • Provide a direct 1:1 AST mapping of a Turtle document
  • Provide abilities to easily navigate and edit the AST
  • Preserve the format: Parsing a document and then writing it, should yield the input document, including all whitespace and comments

Non-Goals

  • The main harriet crate doesn't aim to produce a RDF graph via interpreting the contents of a document. This is left to optional crates, that convert the AST into a specific RDF representation (e.g. rdftk)

Contributing

We are happy about any contributions!

To get started you can take a look at our Github issues.

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

License

Licensed under either of

at your option.

Dependencies

~1.5MB
~23K SLoC