Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. sea-orm

sea-orm

Apache-2.0Rust2.0.0-rc.38

A powerful, async relational ORM for Rust with advanced relations, nested persistence, and GraphQL integration.

Visit WebsiteGitHubGitHub
9.7k stars705 forks0 contributors

What is sea-orm?

SeaORM is a relational Object-Relational Mapping library for Rust that provides a high-level, async interface for interacting with databases like PostgreSQL, SQLite, and MySQL. It solves the problem of writing repetitive and error-prone SQL by offering a type-safe, expressive API for modeling relationships, performing queries, and handling migrations. It is designed to accelerate the development of REST, GraphQL, and gRPC APIs.

Target Audience

Rust developers building data-intensive web services, backends, or applications that require complex database interactions and relationships. It is particularly suited for teams seeking a production-ready ORM with features like nested persistence and GraphQL integration.

Value Proposition

Developers choose SeaORM for its advanced relationship modeling, performance optimizations like the Smart Entity Loader to prevent N+1 queries, and its comprehensive feature set including migrations, raw SQL support, and seamless integration with popular Rust web frameworks. Its philosophy of being 'batteries-included' reduces boilerplate and accelerates development.

Overview

🐚 A powerful relational ORM for Rust

Use Cases

Best For

  • Building async web services in Rust with Actix, Axum, or Rocket
  • Modeling complex database relationships (1-1, 1-N, M-N) in a type-safe way
  • Generating and auto-syncing database schemas from Rust entity definitions
  • Eliminating N+1 query problems in nested relational data loads
  • Persisting nested object graphs (e.g., user with profile, posts, and tags) in a single transaction
  • Creating GraphQL APIs quickly from existing SeaORM entities using Seaography

Not Ideal For

  • Projects requiring commercial-grade SQL Server support without additional licensing, as it's offered separately via SeaORM-X based on an older version
  • Teams already deeply integrated with alternative Rust ORMs like Diesel, where migration effort outweighs benefits
  • Applications with extreme low-latency database queries where hand-optimized SQL is preferred over ORM abstraction
  • Lightweight CLI tools or embedded systems where a minimal dependency footprint is critical, despite the synchronous option

Pros & Cons

Pros

Advanced Relationship Modeling

Handles 1-1, 1-N, M-N, and self-referential relationships with high-level abstractions, as shown in the entity format examples, making complex data schemas intuitive to define.

Smart Entity Loader

Intelligently uses joins for 1-1 and data loaders for 1-N relations to eliminate N+1 queries in nested loads, demonstrated in the code snippet with only three queries for a user with profile and posts.

Nested Persistence Simplicity

ActiveModel allows persisting entire object graphs like user, profile, posts, and tags in a single save() operation with automatic dependency resolution, reducing transactional boilerplate.

Entity-First Workflow

Enables automatic schema creation and synchronization from Rust entities when using the entity-registry feature, streamlining database migrations as highlighted in the 2.0 blog posts.

Cons

Commercial SQL Server Limitation

SQL Server support is locked behind SeaORM-X, a commercial offering based on SeaORM 1.0, creating fragmentation and added cost for enterprises needing MSSQL compatibility.

Breaking Changes Overhead

SeaORM 2.0 introduces breaking changes requiring a migration guide, which can disrupt existing projects and increase maintenance effort, as admitted in the release notes.

Feature Flag Complexity

Core functionalities like entity-registry and schema-sync require enabling specific feature flags, adding setup steps and potential confusion for new users beyond basic usage.

Frequently Asked Questions

Quick Stats

Stars9,693
Forks705
Contributors0
Open Issues159
Last commit1 day ago
CreatedSince 2021

Tags

#orm#database#postgres#web-services#sqlx#graphql#async#tokio#migrations#postgresql#mariadb#mysql#sqlite#rust#sql

Built With

R
Rust

Links & Resources

Website

Included in

Rust56.6k
Auto-fetched 22 hours ago

Related Projects

SurrealDBSurrealDB

A scalable, distributed, collaborative, document-graph database, for the realtime web

Stars32,349
Forks1,279
Last commit3 days ago
QdrantQdrant

Qdrant - High-performance, massive-scale Vector Database and Vector Search Engine for the next generation of AI. Also available in the cloud https://cloud.qdrant.io/

Stars31,902
Forks2,329
Last commit1 day ago
RustFSRustFS

🚀2.3x faster than MinIO for 4KB object payloads. RustFS is an open-source, S3-compatible high-performance object storage system supporting migration and coexistence with other S3-compatible platforms such as MinIO and Ceph.

Stars28,517
Forks1,233
Last commit23 hours ago
NeonNeon

Neon: Serverless Postgres. We separated storage and compute to offer autoscaling, code-like database branching, and scale to zero.

Stars22,167
Forks982
Last commit14 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub