How the app is built

One Rust workspace, a native GPU interface, a headless service core, and an engine subprocess - and how the pieces talk.

SQLly is one Rust workspace under client/: a set of library crates plus the application shells in client/apps. There is no webview and no second codebase - the desktop app, the browser preview, the language server, and the CLI engine are all thin faces on the same crates.

The shape

Native interface

The workbench is GPUI - GPU-rendered, native on each platform, and a big part of why the app stays quick. The browser preview compiles the very same views to WebAssembly.

Headless core

sqlly-services holds the real product logic - tools, editing, dumps, plans - with no UI attached, so every frontend calls identical code.

Engine subprocess

Engine work can run in a separate process that speaks compact binary frames. Every request and response is logged with a correlation id, so a hang or crash leaves a complete trail.

Native drivers

sqlly-engines speaks each wire protocol itself - TDS, PostgreSQL, MySQL, and SQLite - with SSH tunneling built in.

A statement's path

  1. You type. The editor asks the IntelliSense model for completions; the model is built from the live schema, local DDL, and any data awareness you have enabled.
  2. You run. The statement passes through the service layer, where safety rules - read-only connections, transaction wrapping, confirmations - are applied first.
  3. The engine executes. The driver streams rows back with backpressure; oversized results spill to disk instead of eating the machine's memory.
  4. Results land. The grid, pivot, charts, and exporters all read the same streaming result model.

Remote access

Away from the desk, the same engine path travels through sqlly-remote over the sqlly-relay service. An on-prem sqlly-bridge daemon dials out from your network, the relay routes the encrypted traffic, and sqlly-wire defines the framing. The relay can route what it cannot read.

Where it runs

  • macOS on Apple Silicon.
  • Windows and Linux, both x64 and arm64.
  • Browser preview - the real app compiled to WebAssembly against sample data; a demo, not a cloud service.

Tests as part of the build

Tests are written alongside every layer: unit tests in each crate's sources, integration suites in tests/, golden-file comparisons that behave the same on every platform, and conformance runs against real SQL Server, PostgreSQL, MySQL, and SQLite. scripts/count-rust-tests.sh totals them at any time - 7,413 tests as of this writing. The crates page lists the count for each one.