RaftDB, included with Ruststudio

RaftDB is a database written in Rust that stores JSON documents and answers SQL, and that MySQL, MariaDB, SQL Server and PostgreSQL clients can connect to. It is included with Ruststudio: install it from Tools > Install RaftDB, or tick it in the setup. It is not a drop-in replacement for those products in every respect.

Updated · describes Ruststudio 0.1.7

One database for JSON documents and SQL, written in Rust, free with Ruststudio. New full-stack projects use it by default, so a project runs with a real database from the first build.

What it brings

RaftDB stores a table row as a binary document, keeps it in memory or on disk, and answers both JSON filters and SQL through one query plan. Every acknowledged write is on disk first: writes go to a write-ahead log, and many writers share one flush.

In front of that engine sit front-ends that speak the wire protocols of MySQL, MariaDB, SQL Server and PostgreSQL, so the usual client tools and drivers connect to it unchanged. One install gives you all of them, which is handy for development and tests when an application targets more than one database.

  • JSON-native: a document keeps its own field names and is about 0.44 of the size of the same JSON text.
  • One plan for JSON filters and SQL: the same scan, the same index choice, the same paging.
  • Durable by default, with read-only replicas, synchronous confirmation by a chosen number of replicas, and automatic failover decided by a quorum of watchers.
  • A web tool, the Studio, served by the same port, and client libraries for many languages, including a Rust client.
  • Free with Ruststudio, for Windows and Linux.

What it is not

We keep this list honest. RaftDB is not a drop-in replacement for MySQL, MariaDB, SQL Server or PostgreSQL in every respect, and it does not claim to be the fastest database. Compatibility is partial and different for each product: every SQL feature is checked by running the same statements on the real product and on RaftDB, and anything that is not supported is refused with an error instead of being ignored.

Its speed figures come from its own benchmarks on a few machines and are relative, so measure it with your own data before you rely on it. It is at version 0.0.5, not 1.0, and today it suits evaluation, development and test environments best. Transactions in the SQL front-ends are isolated one table at a time, and only the SQL client connections can use TLS, so put a tunnel in front of it on a network you do not control.

Use it from Ruststudio

Open Tools > Install RaftDB to download the newest release, which is checked against its published SHA-256 before it runs, or tick RaftDB in the Ruststudio setup. Installing it asks for administrator approval, because it runs as a service.

New full-stack projects (React, Vue, Svelte, Angular) and the axum API template can use RaftDB as their database; choose None in the project wizard if you prefer another one.

Frequently asked questions

Something else? Ask in the community forum or send feedback.

Is RaftDB free?

Yes. It is included with Ruststudio at no cost.

Can RaftDB replace MySQL, PostgreSQL or SQL Server?

Not in every respect. It speaks their client protocols, so many applications connect without changes, but compatibility is partial and checked feature by feature. Read its list of what is not supported before you move a real application, and try your own queries first.

Is RaftDB the fastest database?

We do not claim that. Its own benchmarks are relative and come from a few machines. Measure it with your own data and workload.

Which systems does it run on?

Windows and Linux. Download it from Tools > Install RaftDB in Ruststudio or from raftdb.com.