sqlr icon sqlr
sqlr icon

sqlr.

A universal database client: native Rust, egui, no webview. One app for relational, document and key-value databases — and any other database you add by writing a driver. Open source, MIT licensed.

Rust native + egui No webview MIT licensed 60 fps on 1M+ rows

01What it does

A complete set of database development tools in a fast native UI. The highlights:

Grid editing

Double-click a cell, add, duplicate or delete rows. Changes are tinted until you Preview the generated SQL, then Apply or Discard. Concurrent changes from other sessions are detected and named.

SQL editor for big scripts

Only visible lines are laid out: a 10 MB file scrolls and takes typing in well under a frame. Statement coloring, autocomplete, find/replace, multi-caret editing, formatting (⌥⌘L) and a command palette (⌘⇧P) over commands, snippets and history.

Profiles & commit modes

Each connection gets a Development, Test or Production profile — with its color, commit mode (Auto, Manual, Smart), a read-only flag and confirmation rules for writes and destructive statements.

Object editors

Tables, views, indexes, sequences, functions, triggers, schemas and databases open in tabs with sub-tabs for structure, definition, dependencies and sample data.

Transfer tools

Export queries to CSV/JSON, import files back, and copy between connections — including between two different database engines, row by row.

NoSQL, first class

MongoDB and Elasticsearch get document views with expandable JSON trees; Redis gets a key-value browser. A MongoDB shell subset covers the everyday commands.

02Supported databases

Bundled drivers ship in the app; every other driver downloads from the sqlr release in the Driver Manager, or installs from a local driver file.

DatabaseTypeHow it shipsNotes
PostgreSQLRelationalbundledFull driver: catalog, queries, grid editing, object editors.
MySQL / MariaDBRelationalbundledFull driver with dialect-aware queries and metadata.
SQL ServerRelationalbundledNative TDS driver over rustls; SQL authentication and SSH tunnels.
OracleRelationalbundledPure-Rust oracle-rs; no OCI or Instant Client.
SQLiteRelationalbundledFile-per-database, no server required; backups and traces.
DuckDBRelationaldownloadSidecar embedding the DuckDB engine; local files and in-memory databases, no Java.
SnowflakeRelationalbundledHTTPS SQL API with OAuth, PAT or JWT tokens; independent auto-commit requests.
MongoDBDocumentbundledCollections, document viewer, shell-subset commands.
ElasticsearchSearch / documentbundledIndices, documents, query DSL.
RedisKey-valuebundledKV browser with type-aware values.
SAP HANARelationaldownloadSidecar built on hdbconnect_async, downloaded in the Driver Manager.
Any JDBC databaseRelationaldownloadJava 17+ bridge, downloaded in the Driver Manager; pick your database's JDBC jar.

03Performance budgets

These numbers are hard requirements enforced in CI — “not aspirations.” They are what keep sqlr from becoming Electron or a JVM app.

BudgetTargetWhy it matters
Cold start< 1 sThe app must feel instant, like a terminal tool.
Idle memory< 150 MBNo retained heaps; columns live only as needed.
Grid with 1M+ rows60 fpsEditing and scrolling stay fluid on big result sets.
Autocomplete / open table< 50 msCatalog lookups must not lag behind typing.
Distributed binary< 75 MBA lightweight client you can carry anywhere.

04Architecture

A small set of crates with strict boundaries. The UI thread never does I/O; all database work runs on the tokio runtime off the main thread.

CrateRole
sqlr-coreDomain types, columnar chunks, driver traits. Depends on nothing internal.
sqlr-driver-*One driver per database (tokio-postgres, …).
sqlr-engineTokio runtime off the UI thread: sessions, explorer/catalog cache, results, history, installed sidecar drivers.
sqlr-sidecarSidecar protocol, SidecarDriver client, the serve loop.
sqlr-registryDriver-file installs, versions and review, no UI.
sqlr-driver-sdkWrite a driver as a sidecar: re-exports the API and run.
sqlr-driver-testsConformance suite for drivers (dev-dependency only).
sqlr-storeConnections TOML, encrypted credential vault, settings.
sqlr-uiegui widgets: grid, tree, forms, docked panels.
  • Security: no OpenSSL (rustls only); secrets live in an encrypted vault protected by the OS keychain and arrive at connect time.
  • Threads: the UI thread never does I/O; every engine call is async on tokio.
  • Caching: catalog explorer and autocomplete share one in-memory cache with bounded size.
// the whole app is:
native Rust + egui + tokio
// and deliberately not:
no webview · no Electron · no JVM

05Adding a database: sidecars

A database sqlr doesn’t ship with becomes a sidecar driver: a separate executable that sqlr starts and talks to over stdio. Frame protocol v1.0.0 — each message is one length-prefixed frame:

bytesfield
4length — big-endian u32, size of everything after it (9 + payload)
1type
8request id — big-endian u64
…payload (MessagePack for control frames)

Frames are capped at 64 MiB; a driver can be written in Rust with sqlr-driver-sdk — or in any language that can read and write the frames.

# scaffold a driver from the template
cargo generate --path templates/sqlr-driver-template --name my-driver
cd my-driver
cargo test

06Build & run

Requires Rust 1.98+ (workspace edition 2024). The default cargo commands act on the app; sidecar drivers are extra binaries.

# run the app
cargo run

# release build
cargo build --release

# test the workspace + driver conformance
cargo test

# exercise the HANA/JDBC sidecars
cargo test -p sqlr-driver-hana

07Documentation

A step-by-step guide to using sqlr, from the first connection to backups and custom drivers.