awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com

Compile-Time Checked Rust SQL

Ranking updated Jun 30, 2026

For checked SQL queries for Rust, the first results are launchbadge/sqlx (SQLx is a Rust library that uses procedural macros to validate SQL syntax and parameter types at compile time against a live database, providing type-safe query results and supporting multiple databases, connection pooling, and migrations—exactly matching the required features), diesel-rs/diesel and kysely-org/kysely (This is a TypeScript SQL query builder with compile-time type safety and schema compliance, but the visitor specifically wants a Rust library, so it is not usable in Rust projects). sqlc-dev/sqlc and prismagraphql/prisma round out the shortlist. Compare the match explanations and check the project documentation against your requirements.

Libraries and frameworks that provide type-safe SQL query validation during the Rust compilation process.

Compile-Time Checked Rust SQL

Find the best repos with AI.We'll search the best matching repositories with AI.
  • launchbadge/sqlxlaunchbadge avatar

    launchbadge/sqlx

    16,630View on GitHub↗

    This toolkit provides an asynchronous interface for interacting with relational databases, offering a unified driver-agnostic layer for managing connection pools and executing transactions. It is designed to integrate with asynchronous runtimes, enabling non-blocking database operations while maintaining secure, encrypted communication between the application and the database server. The project distinguishes itself through its compile-time validation capabilities, which use procedural macros to inspect SQL syntax and parameter types against a live database schema during the build process. Th

    SQLx is a Rust library that uses procedural macros to validate SQL syntax and parameter types at compile time against a live database, providing type-safe query results and supporting multiple databases, connection pooling, and migrations—exactly matching the required features.

    RustConnection PoolingDatabase MigrationsType-Safe Database Clients
    View on GitHub↗16,630
  • diesel-rs/dieseldiesel-rs avatar

    diesel-rs/diesel

    14,021View on GitHub↗

    This project is a type-safe database toolkit and object-relational mapper designed to enforce structural consistency between database schemas and application code. By leveraging compile-time validation, it ensures that SQL queries and data structures remain synchronized, preventing common errors before the application executes. It provides a comprehensive framework for relational data modeling, allowing developers to define table associations and map database results directly into strongly-typed language objects. The library distinguishes itself through its focus on compile-time safety and au

    Diesel is the Rust ORM and query builder that enforces compile-time schema-aware SQL validation, type-safe query results via a macro-based DSL, and includes support for multiple databases, connection pooling, and migrations—exactly the library you need for compile-time checked SQL.

    RustType-Safe Query Builders
    View on GitHub↗14,021
  • kysely-org/kyselykysely-org avatar

    kysely-org/kysely

    13,969View on GitHub↗

    Kysely is a TypeScript SQL query builder that provides a type-safe interface for constructing and executing database queries. It functions as a database layer that ensures schema compliance and prevents runtime errors by using a fluent interface and a programmable way to build complex SQL statements. The project features a type-safe database layer capable of inferring return types and aliases from SQL selections and joins. It also includes a SQL migration manager to track and apply schema changes across different environments to keep database versions synchronized. The toolkit covers relatio

    This is a TypeScript SQL query builder with compile-time type safety and schema compliance, but the visitor specifically wants a Rust library, so it is not usable in Rust projects.

    TypeScriptDatabase MigrationsType-Safe Database ClientsType-Safe Query Builders
    View on GitHub↗13,969
  • sqlc-dev/sqlcsqlc-dev avatar

    sqlc-dev/sqlc

    17,882View on GitHub↗

    sqlc is a code generation tool that compiles raw SQL queries into type-safe application code. By analyzing SQL statements against database schema definitions during the build process, it eliminates the need for manual data mapping and prevents runtime type errors. The project functions as a schema-aware generator that translates database column types into native language primitives. It distinguishes itself through a modular, plugin-based architecture that allows for the extension of the generation pipeline to support diverse programming languages and custom frameworks beyond its default capab

    sqlc is a code-generation tool that validates SQL queries at compile time and generates type-safe code for multiple languages, but it is a CLI tool written in Go, not a Rust library you can import and use directly.

    GoType-SafeType-Safe Database Clients
    View on GitHub↗17,882
  • prismagraphql/prismaprismagraphql avatar

    prismagraphql/prisma

    16,393View on GitHub↗

    Prisma is a type-safe database object-relational mapper that uses a declarative schema to map data models to relational and document databases. It provides a unified toolkit for data access, combining a database driver with tools for schema management and record manipulation. The project features a multi-database driver that standardizes interactions across PostgreSQL, MySQL, and MongoDB. It includes a system for tracking and applying structural schema migrations across different environments and a graphical user interface for browsing and editing database records. The system ensures data in

    Prisma is a type-safe ORM with schema-based data access, but it is not a Rust library focused on compile-time SQL query validation; it is a broader toolkit across multiple languages, so it only partially overlaps with your search.

    ScalaMulti-Database ConnectorsType-Safe Database ClientsType-Safe Query Builders
    View on GitHub↗16,393
  • stephencelis/sqlite.swiftstephencelis avatar

    stephencelis/SQLite.swift

    10,167View on GitHub↗

    SQLite.swift is a type-safe Swift wrapper and object-relational mapping layer that provides a bridge for interacting with SQLite databases. It functions as a database driver that allows for embedded database management and local data persistence within Swift applications. The project distinguishes itself through a type-safe expression builder that verifies SQL statement syntax and intent at compile time. It includes specialized support for high-performance text matching via full-text search integration and provides mechanisms for securing sensitive data through database encryption. The libra

    This is a Swift library that validates SQL queries at compile time with a type-safe builder, but the search specifically asks for a Rust library, so the language mismatch places it as a related but not direct answer.

    SwiftDatabase MigrationsSchema MigrationsType-Safe Query Builders
    View on GitHub↗10,167
  • prisma/prismaprisma avatar

    prisma/prisma

    46,366View on GitHub↗

    Prisma is a database toolkit that provides a unified access layer for interacting with relational and document databases. It centers on a declarative schema modeling approach, where developers define their data structures in a human-readable language. This schema serves as the single source of truth, from which the toolkit automatically generates type-safe database clients that provide compile-time validation and editor autocomplete for all data operations. The project distinguishes itself through a high-performance, Rust-based query engine that handles query planning and connection pooling o

    Prisma is a database ORM for TypeScript/JavaScript with a Rust-based engine that generates type-safe clients, but it is a full ORM toolkit in that language ecosystem, not a Rust library for compile-time validated raw SQL queries — the language and focus differ from what you are looking for.

    TypeScriptType-Safe Database ClientsType-Safe Query Builders
    View on GitHub↗46,366
  • seaql/sea-ormSeaQL avatar

    SeaQL/sea-orm

    9,410View on GitHub↗

    Sea-ORM is an asynchronous SQL object-relational mapper and database toolkit for mapping relational tables to strongly typed objects. It provides a relational database mapper for performing CRUD operations across MySQL, PostgreSQL, and SQLite, and includes a programmatic dynamic query builder for constructing complex SQL statements. The project distinguishes itself by providing a GraphQL schema generator that transforms database entities into typed schemas with built-in pagination and filters. It also features a dedicated database migration tool for defining and applying versioned schema chan

    Sea-ORM is a full-featured ORM and migration toolkit for Rust, supporting multiple databases and connection pooling, but its query builder is programmatic and runtime-based, not a macro that validates SQL at compile time—so it does not provide the compile-time SQL syntax checking your search is focused on.

    RustConnection PoolingConnection PoolsDatabase Migrations
    View on GitHub↗9,410
  • simolus3/driftsimolus3 avatar

    simolus3/drift

    3,231View on GitHub↗

    Drift is a type-safe SQL persistence library and relational mapper that provides a structured way to map database tables to classes and execute SQL queries with build-time validation. It functions as a type-safe query builder and a wrapper for SQLite and PostgreSQL, eliminating manual result set parsing by binding query outputs to native objects. The project distinguishes itself through a build-time code generation system that produces type-safe APIs and validates raw SQL statements against database versions before execution. It features reactive query streaming, which transforms SQL queries

    Drift provides compile-time SQL validation and type-safe queries, but it is a Dart/Flutter library, not a Rust library—your search specifically calls for a Rust-based compile-time checked SQL query library, so this candidate is in the wrong language ecosystem.

    DartType-SafeType-Safe Database ClientsType-Safe Query Builders
    View on GitHub↗3,231
  • digitallyinduced/ihpdigitallyinduced avatar

    digitallyinduced/ihp

    5,294View on GitHub↗

    ihp is a type-safe web framework and full-stack application orchestrator designed for PostgreSQL. It functions as a server-side rendering framework and a type-safe ORM that automatically generates record types from SQL schemas to ensure compile-time query validation. The platform distinguishes itself by verifying routing, database queries, and templates at compile time to prevent runtime crashes. It implements real-time web interfaces using WebSockets for instant data synchronization and employs server-driven hypermedia for partial DOM patching. The framework covers a broad range of integrat

    IHP is a Haskell web framework with compile-time SQL validation, but it's not a Rust library — you need a Rust-focused tool like sqlx for compile-time checked queries.

    HaskellType-SafeType-Safe Database Clients
    View on GitHub↗5,294
Compare the top 10 at a glance
RepositoryStarsLanguageLicenseLast push
launchbadge/sqlx16.6KRustapache-2.0Feb 12, 2026
diesel-rs/diesel14KRustapache-2.0Feb 15, 2026
kysely-org/kysely
14K
TypeScript
MIT
Jun 22, 2026
sqlc-dev/sqlc17.9KGoMITJun 12, 2026
prismagraphql/prisma16.4KScalaApache-2.0Sep 1, 2022
stephencelis/sqlite.swift10.2KSwiftMITJun 4, 2026
prisma/prisma46.4KTypeScriptApache-2.0Jun 12, 2026
seaql/sea-orm9.4KRustapache-2.0Feb 21, 2026
simolus3/drift3.2KDartMITJun 22, 2026
digitallyinduced/ihp5.3KHaskellMITJun 22, 2026

Related searches

  • an object relational mapper for Rust
  • typed code generated from my SQL
  • a TypeScript-first ORM for SQL databases
  • a type-safe ORM for Python
  • a database layer for Kotlin
  • a notebook for running SQL
  • an AI assistant for SQL queries
  • a desktop client for my SQL databases