# SeaORM

> A powerful relational ORM for Rust

Source: https://talira.ai/catalog/seaorm-rbxbb26e
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / databases / orm](https://talira.ai/categories/libraries/databases/orm), [languages / rust](https://talira.ai/categories/languages/rust)
- Platforms: linux, macos, windows
- Licence: MIT OR Apache-2.0
- Pricing: Free and open source
- Pricing notes: SQL Server support (SeaORM-X) is offered as commercial access on request
- Free tier: yes
- Self-hostable: yes
- Backed by: [SeaQL](https://talira.ai/orgs/seaql.md)
- Funding: funded by donations[^1]
- Sponsors: JetBrains

SeaORM is an async relational ORM for Rust, built on SQLx and SeaQuery, for [MySQL](https://talira.ai/catalog/mysql-dy4scprm.md)/MariaDB, [PostgreSQL](https://talira.ai/catalog/postgresql-cm55wcnd.md) and [SQLite](https://talira.ai/catalog/sqlite-cys3nt23.md) on tokio. Entities can be generated from an existing database with sea-orm-cli, or written first and synced to the schema, and relations cover 1-1, 1-N, M-N and self-referential links. Its entity loader uses joins and batched queries to avoid N+1s in nested loads, ActiveModel builders persist whole object graphs in one call, and it has migrations, pagination and raw SQL. sea-orm-sync offers the same API without an async runtime, Seaography builds GraphQL APIs from its entities, and SQL Server support (SeaORM-X) is commercial.

## Links

- Website: https://www.sea-ql.org/SeaORM/
- GitHub: https://github.com/SeaQL/sea-orm
- Docs: https://www.sea-ql.org/SeaORM/docs/index/

## Problems it solves

- I want an ActiveRecord-style ORM in Rust instead of writing SQL strings everywhere
- generate Rust model structs from our existing Postgres schema
- query related rows with joins in Rust without N+1 queries
- write database migrations in Rust and run them on deploy
- an async database layer for an axum or actix-web API
- insert a user with their profile, posts and tags in one call and let the library order the writes
- add a column to my struct and have the table updated without writing a migration by hand
- paginate and filter query results for a REST or GraphQL endpoint in Rust
- use the same ORM against SQLite in tests and Postgres in production
- an ORM for a small Rust CLI with SQLite that doesn't need tokio
- Diesel's compile-time query types are too hard to work with for dynamic queries
- stand up a GraphQL API over my database tables in Rust quickly

## Features

- MySQL/MariaDB, PostgreSQL and SQLite via SQLx
- entity generation from a database (sea-orm-cli)
- entity-first schema sync (2.0)
- 1-1, 1-N, M-N and self-referential relations
- smart entity loader that avoids N+1
- nested ActiveModel persistence
- migrations
- pagination and nested selects
- raw SQL with parameter expansion
- synchronous API via sea-orm-sync (Rusqlite)
- Seaography GraphQL
- SeaORM Pro admin panel

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.83 out of 1.
Signals: maintenance 1.00, adoption 0.80, momentum 0.65, community 0.99, backing 0.90, extensibility 0.20.

- last commit 13 days ago
- 60 commits in the last 90 days
- latest release 2.0.4 57 days ago
- 10.0k GitHub stars
- 302 contributors
- accepts sponsorship (Github)
- backed by SeaQL
- funding: funded by donations
- sponsored by JetBrains
- used by Zed, Servo, OpenObserve, RisingWave

## Alternatives

- [SQLx](https://talira.ai/catalog/sqlx-b3cqrj9z.md): The Rust SQL Toolkit

## Sources

[^1]: https://github.com/sponsors/SeaQL (checked 20 Nov 2026)
