For an object relational mapper for Rust, the strongest matches are launchbadge/sqlx (SQLx is a high-performance, asynchronous database toolkit for Rust), diesel-rs/diesel (Diesel is a comprehensive, type-safe ORM and database toolkit) and seaql/sea-orm (Sea-ORM is a comprehensive, asynchronous ORM for Rust that). brendonovich/prisma-client-rust and kysely-org/kysely round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
We curate open-source GitHub repositories matching “best rust orm libraries”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.
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 high-performance, asynchronous database toolkit for Rust that provides compile-time type-safe queries, robust migration support, and a unified interface for multiple relational databases, perfectly matching the requirements for a modern Rust ORM.
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 a comprehensive, type-safe ORM and database toolkit for Rust that provides a robust query builder, schema migration support, and multi-database compatibility, making it a flagship solution for this category.
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 comprehensive, asynchronous ORM for Rust that provides type-safe query building, multi-database support, and integrated migration tools, making it a flagship solution for this category.
Prisma Client Rust is an object-relational mapping tool and database query builder designed for Rust applications. It functions by reading database schema definitions during the build process to generate strongly typed client code, ensuring that data structures are validated at compile time to prevent runtime errors. The project distinguishes itself through its use of compile-time schema introspection and a trait-based query builder, which together enforce type safety across all database interactions. By mapping raw database rows directly into native Rust structures, it provides a consistent
This library provides a type-safe interface for Rust by leveraging the Prisma schema engine, offering a robust query builder and migration support that fits the requirements for a database toolkit.
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-based SQL query builder and migration tool, which does not meet the requirement for a library designed for the Rust programming language.
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 database toolkit and ORM, but it is primarily built for the Node.js and TypeScript ecosystem rather than being a native Rust library for managing database interactions.
Knex is a multi-dialect database client that provides a programmatic SQL query builder, a connection pool manager, and a versioned schema migration tool. It enables programmatic database interaction across multiple SQL engines, including PostgreSQL, MySQL, SQLite3, SQL Server, CockroachDB, and Oracle. The project distinguishes itself through a fluent interface for constructing complex SQL statements and a dedicated framework for database seeding. It utilizes specialized dialects to translate generic query representations into database-specific syntax while maintaining a consistent API across
This is a JavaScript-based query builder and migration tool, which does not meet the requirement for a library designed for the Rust programming language.
Gel is an object-relational database system that models data as a graph of interconnected objects. By utilizing a strongly typed schema, it enables complex relational queries and polymorphic data structures without the need for traditional join tables. The system integrates native vector storage and similarity search operators, allowing it to function as both a relational and a vector database for semantic data retrieval. The platform distinguishes itself through a comprehensive suite of developer-centric automation tools. It features a declarative migration system that tracks and versions sc
Gel is a standalone object-relational database system rather than a library or toolkit for managing interactions with existing databases in Rust.
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
While this toolkit uses a Rust-based query engine internally, it is a TypeScript-first ORM designed for the Node.js ecosystem rather than a library for native Rust development.
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
This library is designed for the Dart and Flutter ecosystem rather than Rust, making it a mismatch for your specific language requirement.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| launchbadge/sqlx | 16.6K | Rust | apache-2.0 | |
| diesel-rs/diesel | 14K | Rust | apache-2.0 | |
| seaql/sea-orm | 9.4K | Rust | apache-2.0 | |
| brendonovich/prisma-client-rust | 1.9K | Rust | Apache-2.0 | |
| kysely-org/kysely | 14K | TypeScript | MIT | |
| prismagraphql/prisma | 16.4K | Scala | Apache-2.0 | |
| knex/knex | 20.3K | JavaScript | MIT | |
| geldata/gel | 14.1K | Python | apache-2.0 | |
| prisma/prisma | 46.4K | TypeScript | Apache-2.0 | |
| simolus3/drift | 3.2K | Dart | MIT |