Rust connectors for every well-known database

Pick a database, pick a driver, and Rust Studio adds it with cargo and writes a runnable example that connects. 28 connectors for 17 databases, and ODBC for the rest.

Try the database connectors

Search for a database or a compatible product, add a Rust driver to the project, and read the example it writes.

Rust Studio · Database ConnectorsInteractive · simulated

PostgreSQL: 5 connector(s)

  • sqlx: async SQL toolkit with a connection pool
    Relationalasync (tokio)
    Also works with CockroachDB, YugabyteDB, TimescaleDB, Amazon Aurora PostgreSQL, Amazon Redshift.
  • tokio-postgres: async driver
    Relationalasync (tokio)
    Also works with CockroachDB, YugabyteDB, TimescaleDB, Amazon Aurora PostgreSQL.
  • postgres: blocking driver
    Relationalblocking
    Also works with CockroachDB, YugabyteDB, TimescaleDB.
  • diesel: ORM and query builder
    Relationalblocking
    Needs the PostgreSQL client library (libpq) at build time.Also works with CockroachDB.
  • SeaORM: async ORM
    Relationalasync (tokio)
    Also works with CockroachDB, YugabyteDB.

Try it: type “postgres”, pick sqlx or tokio-postgres, press Add to project, then read the example it wrote. Typing “cockroach” or “valkey” finds the driver that works with them.

What you get

SQL

PostgreSQL, MySQL, SQLite

sqlx, tokio-postgres, postgres, mysql_async, mysql, rusqlite, libsql, diesel and SeaORM, async and blocking, with the right features switched on.

Enterprise

SQL Server and Oracle

tiberius, a pure-Rust SQL Server driver that also reaches Azure SQL, and the oracle crate for Oracle Database.

NoSQL

MongoDB, Redis, Memcached

The official MongoDB driver, the standard redis client (Valkey and ElastiCache too) and a Memcached client.

Distributed

Cassandra and ScyllaDB

The pure-Rust scylla driver, which also talks to Apache Cassandra and Amazon Keyspaces.

Analytics

ClickHouse and DuckDB

An async ClickHouse client, and DuckDB embedded in your program.

Search and graph

Elasticsearch, OpenSearch, Neo4j, SurrealDB

The official search clients, an async Bolt driver for Neo4j and Memgraph, and the SurrealDB client.

Cloud

DynamoDB and anything with ODBC

The AWS SDK for DynamoDB, and odbc-api for Db2, Teradata, SAP HANA, Informix, Snowflake and other ODBC databases.

Compatible

Search by what you run

Type CockroachDB, MariaDB, TiDB, Valkey, Aurora or Cosmos DB for MongoDB and find the driver that speaks its protocol.

One click: dependency and a working example

Choose a connector under Tools, Database Connectors. Rust Studio runs cargo add with the features that driver needs (and the async runtime, when it needs one), then writes examples/db_<database>_<crate>.rs and opens it. Edit the connection string and press Ctrl+F5.

The catalogue is a table in Rust Studio itself, and every entry is checked against the real crates: the crate and feature names must resolve, and the example must compile. Drivers that need a native library, such as libpq for diesel, or a long C++ build, such as DuckDB, say so in the list.

  • Async drivers come with tokio and its macros
  • Blocking drivers need nothing extra
  • Examples never contain real passwords: change the placeholder connection string
  • Add as many connectors as you like; each gets its own example file

How it works

  1. Open Database Connectors

    Tools, Database Connectors, or the command palette.

  2. Search

    Type a database, a crate or a compatible product (postgres, sqlx, cockroach).

  3. Choose a driver

    Rust Studio adds it to the project of the open file, or the startup project.

  4. Run the example

    Edit the connection string in the new example and press Ctrl+F5.

Frequently asked questions

Which databases are covered?

PostgreSQL, MySQL and MariaDB, SQLite, SQL Server, Oracle, MongoDB, Redis, Memcached, Cassandra and ScyllaDB, ClickHouse, DuckDB, Elasticsearch, OpenSearch, Neo4j, SurrealDB, DynamoDB, and any database with an ODBC driver.

What about CockroachDB, Aurora, TiDB or Valkey?

They speak the protocol of a database above, so they use the same driver: CockroachDB and Aurora PostgreSQL use the PostgreSQL drivers, TiDB and PlanetScale the MySQL ones, Valkey the Redis client.

Does it install the database server?

No. It adds the Rust driver and an example. You bring the server, local or in the cloud, and its connection string.

Are these NuGet packages?

They are Rust crates from crates.io, added with cargo. Rust Studio also packs your own Rust libraries as NuGet packages for .NET, and restores native NuGet packages for Rust, on its NuGet pages.

Is Rust Studio free?

Yes. Rust Studio is free for personal and commercial use, with no account, trial or licence key. It is closed-source freeware.

Which systems does Rust Studio run on?

Windows 10 and 11 (64-bit). You can build for Windows, the web and Android from it. iOS builds need a Mac with Xcode.