sqlx (Rust SQL Toolkit)
sqlx.run
4
Leaving SiteNav
External Link Disclaimer
You are about to visit sqlx.run. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
sqlx is an async, pure-Rust SQL toolkit designed for compile-time checked queries and high-performance database access. Created by Ryan Leckey and now maintained by Austin Bonander and the community, sqlx has over 14,000 stars as of 2026. Unlike traditional database drivers or ORMs that only catch SQL errors at runtime, sqlx provides the unique ability to validate SQL queries at compile time by connecting to a development database during the build process and verifying that your SQL syntax, table names, and column types are correct. Key features include: compile-time SQL checking (the macro connects to your database at build time, executes the query with EXPLAIN, and verifies the query is syntactically and semantically correct, catching typos and schema mismatches before your code ever runs), async runtime support (built on Tokio, async-std, and Actix, providing non-blocking database I/O for high-throughput web applications), query macros (query! for compile-time checked queries that return typed rows, query_as! for mapping rows directly to structs, and query_file! for loading SQL from external files), native type mapping (automatically converting database column types to Rust types, with support for custom types via Decode and Encode traits), connection pooling (sqlx::PgPool and similar pool types for managing database connections with configurable min/max connections, idle timeout, and connection lifetime), transaction support (beginning, committing, and rolling back transactions with automatic savepoint management for nested transactions), migration system (sqlx migrate for managing database schema changes with embedded migrations and version tracking), offline mode (caching query metadata for CI/CD builds without database connectivity via sqlx prepare), and support for PostgreSQL, MySQL, MariaDB, and SQLite databases.
Statistics
4
Views
0
Clicks
0
Like
0
Dislike