Ejdb.rs, bindings for an embedded document-oriented database library


I’d like to announce the first release of ejdb.rs, which provides high-level bindings for EJDB, an embedded document-oriented database much like MongoDB.

I was looking for an embeddable database to use in one of my projects and since I’m currently working with MongoDB on my main job I decided that I don’t want a relational database (and it looks like that it doesn’t suit my project anyway). So I set out looking for something similar to SQLite but with less SQL in it, and I found EJDB.

EJDB is a C library which allows storing, querying and manipulating BSON documents, with a very MongoDB-like interface, especially in queries. It provides a relatively small C API. And so I decided to write an idiomatic Rust bindings for it. This resulted in ejdb.rs. Currently it provides access to the whole set of the original library’s API, as far as I can tell: database management, collections management, queries, indices, transactions. The library doesn’t have much tests now and it is not used anywhere yet, but basic tests show that it works pretty nicely.

Here it is: crates.io, source, documentation

I’ve tried to make the API as rusty as possible (some things, like transactions, are inspired by rusqlite), but there is definitely a space for improvements. Feel free to post issues and feature requests on Github.


BTW, I’ve created a Dockerfile to run ejdb command line client (again, with MongoDB-like interface), it is available here. If you want to use EJDB, it should be useful, because building the client is not always easy because it can’t run with the latest node version.