Skip to content

suiflex/rdb

Repository files navigation

RDBS

A native, lightweight, cross-platform database manager built with Rust and Slint — in the spirit of TablePlus but compiled from a single codebase for macOS and Linux.

Features

  • Multi-engine — PostgreSQL, MySQL/MariaDB, Redis, MongoDB, SQLite, Cassandra in one app
  • Native UI — GPU-rendered via Slint (no webview, no Chromium, no Electron)
  • Fast & light — no GC, no runtime; aggressive release optimization (LTO, opt-level=z, panic=abort)
  • Secure connections — passwords stored in OS keychain (macOS Keychain, libsecret) with AES-GCM encrypted-file fallback
  • Schema browser — sidebar tree: databases → tables/collections/keys → columns/fields
  • Tabbed query editor — multiple tabs per session, one per engine
  • Results grid — resizable columns, client-side row filtering, copy support
  • Command paletteCmd+K to jump to any connection or table instantly
  • DSN import — paste a connection URL, fields auto-fill
  • Connection test — verify creds before saving
  • Light / dark mode toggle

Supported Engines

Engine Protocol Result type
PostgreSQL tokio-postgres Tabular
MySQL / MariaDB mysql_async Tabular
Redis redis crate Key-value / raw
MongoDB mongodb crate Documents (JSON)
SQLite rusqlite Tabular
Cassandra scylla Tabular

Design

Core design rule

The UI (app/) depends only on rdbs-core. It never imports a concrete driver crate. Adding a new engine = a new driver-* crate that implements the Driver trait; the UI is untouched.

Async bridge

Slint's event loop runs on the main thread. All I/O (connect, query, schema fetch) spawns on a tokio multi-thread runtime. Results return to the UI thread via invoke_from_event_loop.

Driver trait

#[async_trait]
pub trait Driver: Send + Sync {
    async fn connect(cfg: &ConnConfig) -> Result<Self> where Self: Sized;
    async fn ping(&self) -> Result<()>;
    async fn schema(&self) -> Result<Schema>;
    async fn query(&self, q: &Query) -> Result<ResultSet>;
    async fn close(self) -> Result<()>;
}

Query enum

pub enum Query {
    Sql(String),           // PostgreSQL, MySQL, SQLite, Cassandra
    Command(Vec<String>),  // Redis: ["GET", "key"]
    Mongo(MongoOp),        // find / insert / aggregate
}

ResultSet enum

pub enum ResultSet {
    Tabular   { cols: Vec<Column>, rows: Vec<Row> },
    Documents(Vec<serde_json::Value>),
    KeyValue(Vec<(String, RedisValue)>),
    Affected(u64),
}

Install

Prebuilt installers are expected to be attached to GitHub Releases.

macOS / Linux

curl -fsSL https://raw.githubusercontent.com/suiflex/rdb/develop/scripts/install.sh | bash

Optional:

curl -fsSL https://raw.githubusercontent.com/suiflex/rdb/develop/scripts/install.sh | RDBS_VERSION=v0.1.0 INSTALL_DIR="$HOME/.local/bin" bash

The script installs rdbs into /usr/local/bin when writable, otherwise it falls back to ~/.local/bin.

Build from source

Tool Version
Rust stable (see rust-toolchain.toml)
Cargo bundled with Rust

No additional native dependencies needed on macOS. Linux requires a few system packages for Slint rendering (see below).

Linux system packages

# Debian / Ubuntu
sudo apt install libxkbcommon-dev libfontconfig1-dev libgl1-mesa-dev

# Fedora / RHEL
sudo dnf install libxkbcommon-devel fontconfig-devel mesa-libGL-devel

Build

# Development
cargo build -p rdbs

# Optimized release (~smaller binary)
cargo build --release -p rdbs

# Run directly
cargo run -p rdbs

The release binary lands at target/release/rdbs.

Usage

Add a connection

  1. Launch RDBS — connection picker opens.
  2. Click + → fill in host, port, credentials, database.
  3. Or paste a DSN URL into the Import URL field — fields auto-fill.
  4. Click Test to verify, then Save.

Connect & query

  1. Click a saved connection → connects, schema loads in sidebar.
  2. Type SQL (PostgreSQL/MySQL), a Redis command (e.g. GET key), or a MongoDB JSON operation in the query editor.
  3. Cmd+Enter (macOS) / Ctrl+Enter (Linux) to run.
  4. Click a table/collection in the sidebar to auto-generate and run a SELECT * / find query.

Command palette

Cmd+K — fuzzy-search all connections and schema objects.

Filter results

Type in the Filter box above the grid — filters rows client-side without re-querying.

Project status

Active development. Ships 6 engines (PostgreSQL, MySQL, Redis, MongoDB, SQLite, Cassandra); planned expansion to ~20 (ClickHouse, BigQuery, Oracle, and more).

Crate overview

Crate Description
rdbs Desktop binary (app/)
rdbs-core Driver trait, Query, ResultSet, Schema, RdbsError
rdbs-connstore Saved connections — JSON on disk + OS keychain / AES-GCM file
rdbs-driver-postgres PostgreSQL driver via tokio-postgres
rdbs-driver-mysql MySQL/MariaDB driver via mysql_async
rdbs-driver-redis Redis driver via redis crate
rdbs-driver-mongo MongoDB driver via mongodb crate
rdbs-driver-sqlite SQLite driver via rusqlite
rdbs-driver-cassandra Cassandra driver via scylla

License

MIT

About

Database Editor build with Rust

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages