mrkeyoor.comAsk

transact-rs/sqlxtested 03 Oct 2026commit b54008a

sqlx review

SQLx is worth evaluating when handwritten SQL and async Rust are deliberate choices.

  • Install 51 s
  • Build 35 s
8/24passed, run exited non-zero
  • 114 packages
Dataevaluationupdated 01 Nov 2026
+32stars / 7d

Choose SQLx if your Rust application needs async database access and your team wants to write SQL directly. SQLx checks ordinary SQL through optional compile-time macros rather than a Rust query DSL. Our run on October 3, 2026, at commit b54008a built successfully, but the visible integration failures reported a missing runtime feature. That run did not establish application readiness or database performance.

Verdict

SQLx is worth evaluating when handwritten SQL and async Rust are deliberate choices. Accept the feature-selection and query-analysis workflow before adopting checked macros. Our sandbox build succeeded, but the observed tests stopped with runtime-feature panics; this is a configuration finding, not a production-readiness result. Next, validate one representative query against your chosen database with an explicit runtime and TLS configuration, then decide how your builds will obtain query metadata.

We ran it

Lab card: what happened when we ran sqlx
Lab card from our sandbox run
Screenshot of sqlx (github.com/transact-rs/sqlx)
github.com/transact-rs/sqlx
Install✓ · 51s114 packages
Build✓ · 35s
Tests✗ · 74s8 passed · 16 failed of 24 (cargo test)
Repo723 files~84,087 lines of source · 4.2 MB · 3 CI workflows · tests dir

Answers from our run

Does sqlx build from source?

Dependencies installed in 51 seconds (114 packages), and the build succeeded in 35 seconds. We cloned commit b54008a into a clean Debian container with 3 CPUs and no project-specific setup.

Do sqlx's tests pass?

No. The project's own test command finished in 74 seconds and reported 8 passed, 16 failed (cargo test).

Who should not use sqlx?

Teams seeking an ORM's entity and relationship API.

What are the alternatives to sqlx?

SeaORM, Diesel, Rust-Postgres. SQLx is worth evaluating when handwritten SQL and async Rust are deliberate choices.

Setup3/5Installation and build succeeded in our recorded sandbox, but the visible integration failures lacked a runtime feature. Checked macros also require a schema or cached query analysis.
Docs5/5The supplied README covers runtime and TLS features, database drivers, pooling, query APIs, compile-time verification, offline mode and compilation tradeoffs.
Community4/5Last push on 2026-08-20 and 17,669 stars.Editor’s note: The supplied primary extracts do not establish dated contributor participation, maintainer responsiveness or issue-resolution behavior.
Maturity4/5The supplied tag history and documented driver facilities support an established toolkit, but our run does not verify stability across supported database and feature combinations.

How we score

Who it’s for

Rust developers who want handwritten SQL with async connections, pooling and row streaming.
Teams prepared to choose database, runtime and TLS features explicitly.
Projects willing to maintain a schema-matched development database or cached query metadata for compile-time checks.

Who it’s NOT for

Teams seeking an ORM's entity and relationship API.
Builds that require checked query macros but cannot supply either a suitable development database or cached query analysis.
Readers seeking evidence of production throughput, deployment readiness or a security assessment: our run supplies none of those.

Setup reality

Our sandbox run on October 3, 2026, used commit b54008a in the lab-rust:1 image with three CPUs and 12 GB of memory. The attached harness records installation at 51 seconds, build at 35 seconds and tests at 74 seconds. Installation and build returned exit code 0; tests returned 101. It records 114 dependencies.

The stored parser summaries report 8 passed, 16 failed and 24 total. The captured output repeats suite summaries, so those aggregates may double-count results and are not verified unique or exhaustive test counts. Separately, the visible any integration suite reports eight failures, each with the message "one of the runtime features of SQLx must be enabled". The excerpt also shows four passing library unit tests. These suite-specific observations do not replace the stored aggregates.

For an application, select a runtime and database driver, then choose TLS and type features as needed. Checked query macros require a database of the same kind and schema as the runtime database, or cached query analysis for offline compilation. The successful build did not demonstrate that this configuration or a deployed application worked.

What our run establishes

Our run on October 3, 2026, tested commit b54008a329541c0ce230d8b203e0c00fc8e8ea48 in our Rust sandbox. Installation and build succeeded; the test command exited with code 101. The harness records command outcomes through success flags, exit codes, elapsed wall-clock time and captured output, with test counts parsed separately from that output.

The visible any integration failures report a missing SQLx runtime feature. Connection, ping, pool, query and decoding-stream cases all show the same runtime-feature panic. This supplies a concrete explanation for those observed failures. It does not show that SQLx failed against a correctly configured database, or establish what would happen after enabling a runtime.

The stored parser summaries report 8 passed, 16 failed and 24 total. Repeated summaries in the captured output may inflate those aggregates. They must not be read as unique or exhaustive tests. Within the visible raw output, the library unit-test footer reports four passes and the any integration footer reports eight failures. We have not combined those footers into a replacement total.

The attached harness records 51 seconds for installation, 35 seconds for build and 74 seconds for tests. These are command durations from this run, not database benchmarks. A successful build does not verify CLI deployment, migrations, a production workload or all supported database configurations. The audit field is null, and scan coverage is unknown.

The MrKeyoor testing methodology explains the site's command-outcome reporting and sandbox limits. That page is provenance context; its current procedure does not establish which methodology revision governed this October run. This correction uses the existing record and includes no new execution.

What you gain by keeping SQL visible

SQLx checks ordinary SQL through optional compile-time macros rather than a Rust query DSL. The README at the measured commit describes PostgreSQL, MySQL, MariaDB and SQLite support, built-in pooling, row streaming and statement preparation and caching.

You retain responsibility for writing the SQL. SQLx supplies connections and maps results into Rust values; it does not turn that workflow into an ORM's entity model. This suits developers who want direct control over joins and database-specific syntax.

Compile-time checks are optional. The ordinary query API and the checked macros are distinct choices, so adopting SQLx does not require every query to use a macro.

What checked queries require

For live compile-time verification, the development database must have the same database kind and schema as the database used at runtime. It need not contain application data. SQLx asks that database to analyze the query, so accepted SQL syntax and the extent of verification depend on the backend.

Offline mode caches query analysis through the SQLx command-line tool. It lets subsequent compilation use that cached analysis without keeping a development database available when database-accessing code has not changed. Teams still need a process for refreshing the analysis when queries or schemas change.

The README also warns that verified queries do substantial work during compilation. Our build duration does not isolate that cost, and we did not compare checked and unchecked query builds.

Which alternative fits the application?

SeaORM provides entity and relationship APIs and documents SQLx configuration underneath. Consider it when the application benefits from ORM modeling while retaining SQLx as part of the stack. Its supplied README describes the 2.0 line as a release candidate, so evaluate the documentation for the version you intend to adopt.

Diesel is a Rust ORM and query builder with raw SQL support. Consider it when you want to express routine queries through Rust APIs while keeping an escape route for SQL that is easier to write directly. The supplied evidence does not justify a performance comparison with SQLx.

Rust-Postgres provides separate synchronous and asynchronous PostgreSQL clients. Consider that narrower scope when you only need PostgreSQL. Its own test instructions require a correctly configured PostgreSQL service, so it should not be assumed to offer a service-free contributor test run.

How to read the ratings

These are editorial assessments, not benchmark scores. Setup ease uses 1 for a blocked documented path, 3 for a workable path with explicit configuration obligations and 5 for a verified minimal setup. Documentation uses 1 for missing essential guidance, 3 for basic setup coverage and 5 for detailed guidance across installation, queries, features and operational tradeoffs. Community uses 1 for demonstrated inactivity, 3 for documented ongoing participation and 5 for sustained responsiveness supported by dated evidence. Maturity uses 1 for an experimental surface, 3 for documented core capabilities with limited history and 5 for broad stability supported by compatibility evidence; intermediate scores reflect partial support between those anchors.

Setup ease is 3/5: installation and build succeeded, but the observed test configuration lacked a runtime feature and checked macros introduce schema obligations. Documentation is 5/5 for the supplied README's detailed feature, query, macro and offline-mode guidance. Community is unassessed because the supplied extracts do not establish dated participation or response times. Maturity is 4/5: the tag history and documented database facilities support an established toolkit, while this run does not verify compatibility across its supported configurations.

Alternatives

ProjectWhat it isPick it when
SeaORMAn ORM with entities, relationships, migrations and raw SQL support.Evaluate it when entity and relationship APIs fit your application better than writing most queries directly. Its documented SQLx configuration makes it a higher-level option that can retain SQLx underneath, rather than necessarily replacing the driver.
DieselA Rust ORM and query builder that also supports raw SQL.Evaluate it when you prefer constructing queries through Rust's type system. Its raw SQL API also gives complex statements a place alongside the query builder.
Rust-PostgresPostgreSQL clients with separate synchronous and asynchronous crates.Evaluate postgres or tokio-postgres when PostgreSQL is your only database and a dedicated client fits the application. This is a narrower driver choice, not an ORM.

What people are saying

  1. [github-trending] transact-rs/sqlx

Sources

  1. SQLx README
  2. SQLx repository
  3. SQLx tags
  4. Pool connection retry issue
  5. Migration revert issue

More data reviews