Is there any open-source and cross-platform triplestore that could be integrated into a C++ application?

I’m not looking for servers (i.e. 4store or Soprano). The good example for relational databases is SQLite.

  • In Wikipedia’s Triplestore article, there are listed a few written in C++. Do you have any further requirements?
    – unor
    Sep 28, 2014 at 18:25
  • @unor I've been looking for an open-source cross-platform one. 4store is not cross-platform. Neither 4store, nor Soprano is in-app, they're servers. Sep 28, 2014 at 19:47
  • I see, thanks. I edited your question (feel free to correct it if something is missing/wrong).
    – unor
    Sep 28, 2014 at 22:12
  • VistaDB is the best and the most full-featured, but is commercial
    – Amin Saqi
    Sep 29, 2014 at 8:49
  • 1
    This should totally be a thing, right?! Embedded, transactional triple store and query engine. BOOM! … ideally syncable / mergeable too. Like SQLite but, … triply. Great analogy, and should be a thing.
    – Benjohn
    Oct 14, 2017 at 22:55

3 Answers 3


There's cozodb but querying is done in datalog instead of SPARQL.

  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Nov 28, 2022 at 11:06
  • I came back to my question to add exactly this answer. I missed it. Apr 14, 2023 at 16:09

Oxigraph is in Rust rather than C++, but you might be able to find a way to call it from C++, or just spawn a subprocess and call the Command-Line Interfaces (CLI).

DeciSym has a fork that extends Oxigraph to query HDT files. This is intended to combine the data and SPARQL engine in a transportable way that does not require a server process in the style of SQLite. See https://www.datanami.com/2023/03/02/cyberspooks-need-big-data-portability-too/ for details.


The most actively maintained C++ interfaced non-networked RDF library is SEMPR.

Less active (but project is not dead) is the Redland set of libraries.

Another less accessible option is owlcpp. Seemingly dead by now, but might be possible to revive - at least the Fact++ dependency still works with up-to-date Debian (I maintain that Debian package).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.