#linked-data #rdf #semantic-web #w3c


A Rust toolkit for RDF and Linked Data - Graph and Dataset isomorphism

5 releases

0.8.0 Jan 8, 2024
0.8.0-alpha.3 Oct 24, 2023
0.8.0-alpha.2 Sep 15, 2023
0.8.0-alpha.1 May 24, 2023
0.8.0-alpha.0 Feb 10, 2023

#14 in #linked-data

Download history 211/week @ 2023-12-17 82/week @ 2023-12-24 10/week @ 2023-12-31 57/week @ 2024-01-07 131/week @ 2024-01-14 146/week @ 2024-01-21 236/week @ 2024-01-28 312/week @ 2024-02-04 267/week @ 2024-02-11 326/week @ 2024-02-18 257/week @ 2024-02-25 541/week @ 2024-03-03 234/week @ 2024-03-10 351/week @ 2024-03-17 398/week @ 2024-03-24 612/week @ 2024-03-31

1,607 downloads per month
Used in 8 crates (4 directly)


11K SLoC


A Rust toolkit for RDF and Linked Data.

Actions Status Latest Version Documentation

It comprises the following crates:

  • sophia_api defines a generic API for RDF and linked data, as a set of core traits and types; more precisely, it provides traits for describing
    • terms, triples and quads,
    • graphs and datasets,
    • parsers and serializers
  • sophia_iri provides functions, types and traits for validating and resolving IRIs.
  • sophia_inmem defines in-memory implementations of the Graph and Dataset traits from sophia_api.
  • sophia_term defines various implementations of the Term trait from sophia_api.
  • sophia_turtle provides parsers and serializers for the Turtle-family of concrete syntaxes.
  • sophia_xml provides parsers and serializers for RDF/XML.
  • sophia_jsonld provides preliminary support for JSON-LD.
  • sophia_c14n implements RDF canonicalization.
  • sophia_resource provides a resource-centric API.
  • sophia_rio is a lower-level crate, used by the ones above.

and finally:

  • sophia is the “all-inclusive” crate, re-exporting symbols from all the crates above. (actually, sophia_xml is only available if the xml feature is enabled)

In addition to the API documentation, a high-level user documentation is available (although not quite complete yet).


CECILL-B (compatible with BSD)


When using Sophia, please use the following citation:

Champin, P.-A. (2020) ‘Sophia: A Linked Data and Semantic Web toolkit for Rust’, in Wilde, E. and Amundsen, M. (eds). The Web Conference 2020: Developers Track, Taipei, TW. Available at: https://www2020devtrack.github.io/site/schedule.


        title = {{Sophia: A Linked Data and Semantic Web toolkit for Rust},
        author = {Champin, Pierre-Antoine},
        howpublished = {{The Web Conference 2020: Developers Track}},
        address = {Taipei, TW},
        editor = {Wilde, Erik and Amundsen, Mike},
        month = apr,
        year = {2020},
        language = {en},
        url = {https://www2020devtrack.github.io/site/schedule}

Third-party crates

The following third-party crates are using or extending Sophia

  • hdt provides an implementation of Sophia's traits based on the HDT format.
  • manas is a modular framework for implementing Solid compatible servers
  • nanopub is a toolkit for managing [nanopublications(https://nanopub.net/)


An outdated comparison of Sophia with other RDF libraries is still available here.


~79K SLoC