70 releases

0.21.4 Nov 29, 2023
0.21.1 Jul 18, 2023
0.20.1 Mar 15, 2023
0.19.9 Jun 13, 2022
0.8.0 Nov 27, 2019

#22 in Database implementations

Download history 135/week @ 2023-10-31 32/week @ 2023-11-07 99/week @ 2023-11-14 158/week @ 2023-11-21 268/week @ 2023-11-28 337/week @ 2023-12-05 79/week @ 2023-12-12 131/week @ 2023-12-19 209/week @ 2023-12-26 118/week @ 2024-01-02 108/week @ 2024-01-09 59/week @ 2024-01-16 154/week @ 2024-01-23 195/week @ 2024-01-30 62/week @ 2024-02-06 539/week @ 2024-02-13

960 downloads per month
Used in terminusdb-10-to-11

Apache-2.0 and LGPL-3.0+

27K SLoC

terminusdb-store, a tokio-enabled data store for triple data

Build Status Crate Documentation codecov


This library implements a way to store triple data - data that consists of a subject, predicate and an object, where object can either be some value, or a node (a string that can appear both in subject and object position).

An example of triple data is:

cow says value(moo).
duck says value(quack).
cow likes node(duck).
duck hates node(cow).

In cow says value(moo), cow is the subject, says is the predicate, and value(moo) is the object.

In cow likes node(duck), cow is the subject, likes is the predicate, and node(duck) is the object.

terminusdb-store allows you to store a lot of such facts, and search through them efficiently.

This library is intended as a common base for anyone who wishes to build a database containing triple data. It makes very few assumptions on what valid data is, only focusing on the actual storage aspect.

This library is tokio-enabled. Any i/o and locking happens through futures, and as a result, many of the functions in this library return futures. These futures are intended to run on a tokio runtime, and many of them will fail outside of one. If you do not wish to use tokio, there's a small sync wrapper in store::sync which embeds its own tokio runtime, exposing a purely synchronous API.


Add this to your Cargo.toml:

terminus-store = "0.19.2"

create a directory where you want the store to be, then open that store with

let store = terminus_store::open_directory_store("/path/to/store").await.unwrap();

Or use the sync wrapper:

let store = terminus_store::open_sync_directory_store("/path/to/store").unwrap();

For more information, visit the documentation on docs.rs.

See also the examples/ directory for some basic examples.

Upgrading from 0.19 or earlier

Starting with version 0.20.0, terminus-store uses a new storage format, which bundles all files into a single archive, and also supports value types. Stores created using 0.19 or earlier will not work with 0.20 or later. However, there is a conversion tool to convert existing pre-v20 stores: terminusdb-10-to-11.


We are constantly developing terminusdb-store to make it a high quality succinct graph representation versioned datastorage layer. To help facilitate understanding of our aims for this project we have laid out a Roadmap. If you would like to assist in the development of terminusdb-store, or you think something should be added to the roadmap please contact us.


terminus-store is licensed under Apache 2.0.



See also

  • The Terminus database, for which this library was written: Website - GitHub
  • Our prolog bindings for this library: terminus_store_prolog
  • The HDT format, which the terminusdb-store layer format is based on: Website


~864K SLoC