Community & Contribution Guide
Relevant source files
The following files were used as context for generating this wiki page:
SeaORM is a community-driven Object-Relational Mapper (ORM) for the Rust ecosystem. This guide outlines the various ways individuals can participate in the project, ranging from technical code contributions and documentation to community support and financial sponsorship. The project operates under the SeaQL organization and maintains a clear set of guidelines for development and interaction to ensure a productive environment for all contributors.
Sources: CONTRIBUTING.md:5-7, README.md:435-438
The project is governed by the SeaQL Code of Conduct, which all participants are expected to uphold. SeaORM encourages participation through multiple channels, including Discord for real-time chat, GitHub Discussions for long-form questions, and GitHub Issues for feature requests and bug reporting.
Sources: CONTRIBUTING.md:9-15, README.md:40-42
Contribution Pathways
Contributors can engage with SeaORM through several distinct roles and activities. The project specifically looks for long-term contributors who may eventually receive "grants" for their devotion, although the organization currently operates with limited resources for stable income.
Sources: CONTRIBUTING.md:33-38
Types of Support
- General Support: Recommending the project, writing blog posts/tutorials, and helping users in the community.
- Feature Requests: Proposed features are welcomed and implemented if they benefit the wider user base; however, direct code contributions are preferred.
- Sponsorship: Financial contributions via GitHub Sponsors to help sustain the independent open-source organization.
- Code Contribution: Submitting Pull Requests (PRs) for bug fixes, performance improvements, or new features.
Sources: CONTRIBUTING.md:17-31, README.md:470-474
Development Environment Setup
To contribute code, developers must set up a local environment capable of running the SeaORM test suite. The project utilizes a workspace-based Rust structure, and testing is divided into unit tests and live integration tests.
Sources: CONTRIBUTING.md:42-45
Testing Infrastructure
Unit tests do not require a live database and can be executed via Cargo. Integration tests require live database instances, which are typically managed via Docker.
Sources: CONTRIBUTING.md:47-64
| Test Category | Target Component | Command |
|---|---|---|
| Unit Test | Core workspace (sea-orm, macros, codegen) | cargo test --workspace |
| Unit Test | CLI tool (sea-orm-cli) | cargo test --manifest-path sea-orm-cli/Cargo.toml |
| Unit Test | Rocket integration | cargo test --manifest-path sea-orm-rocket/Cargo.toml |
| Integration | SQLite (In-Memory) | DATABASE_URL="sqlite::memory:" cargo test --all --features ... |
| Integration | MySQL | DATABASE_URL="mysql://root:root@localhost" cargo test --all --features ... |
| Integration | PostgreSQL | DATABASE_URL="postgres://root:root@localhost" cargo test --all --features ... |
| Sources: CONTRIBUTING.md:49-75 |
Code Standards and Tooling
The project enforces specific formatting and linting rules:
- TOML Formatting: Handled by
taplo-cliusingtaplo fmt --check. - Sync Generation: The
sea-orm-synccrate is auto-generated from the rootsrc/usingbuild-tools/make-sync.sh. Contributors should never edit files insea-orm-sync/src/directly. - Linting: Denies
missing_debug_implementations,clippy::unwrap_used, andclippy::print_stdout.
Sources: CONTRIBUTING.md:104-110, sea-orm-sync/CLAUDE.md:3-13, src/lib.rs:4-11
Development Workflow for Sync Crate
Because sea-orm-sync provides a synchronous API by stripping async/await from the main source, the workflow for contributing to synchronous features follows a strict transformation process.
Sources: sea-orm-sync/CLAUDE.md:1-13
Sync Transformation Logic
The transformation process utilizes sed scripts to perform the following operations:
- Strip
asyncandawaitkeywords. - Remove
#[async_trait]attributes. - Replace asynchronous primitives (e.g.,
futures_util::lock::Mutex) with synchronous ones (std::sync::Mutex).
Sources: sea-orm-sync/CLAUDE.md:10-13
The diagram above illustrates how changes in the root source directory propagate to the synchronous crate through automated transformation scripts.
Sources: sea-orm-sync/CLAUDE.md:3-16
Community Ecosystem
The SeaORM community maintains an extensive list of software "Built with SeaORM," categorized by industry and use case.
Sources: COMMUNITY.md:1-5
Project Showcase Categories
- Startups: Includes high-profile tools like Zed (multiplayer code editor), RisingWave (stream processing), and Svix (webhooks).
- Open Source Projects: Spans CMS (Backpack, Ryot), Game backends (KongYing Tavern), and System tools (LLDAP).
- Frameworks: Integration with higher-level frameworks like Loco.rs, spring-rs, and tardis.
- Programming Libraries: Tooling built on top of SeaORM, such as
sea-orm-adapterfor Casbin.
Sources: COMMUNITY.md:7-133
Learning Resources
The community provides various educational materials:
- Video Courses: Axum and SeaORM playlists by Brooks Builds.
- Articles: Multi-part series on Async GraphQL with Rust by Brandon Konkle.
Sources: COMMUNITY.md:162-168
Technical Contribution Guidelines (SeaORM 2.0)
When contributing code, developers must follow the SeaORM 2.0 patterns, as they differ significantly from the 1.0 architecture often found in older training data.
Sources: CLAUDE.md:3-7
Key 2.0 Patterns
- Entity Format: Use
#[sea_orm::model]with relations defined directly on theModelstruct instead of separate enums. - Typed Columns: Use the
COLUMNconstant for compile-time type safety (e.g.,user::COLUMN.name.contains("Bob")). - ActiveModel Builder: Utilize the fluent builder API for nested persistence.
- Trait Imports: Ensure
sea_orm::ExprTraitis imported when using methods like.eq()or.contains()onExpr.
Sources: CLAUDE.md:10-25, CLAUDE.md:65-70, CLAUDE.md:95-97
Common Anti-Patterns to Avoid
- Redundant Annotations: Do not specify
column_typeon custom types usingDeriveValueType. - String Truncation: Use
TextorStringLen::Maxfor MySQL/MSSQL strings that may exceed 255 characters. - Manual Implementations: Do not manually implement traits that
DeriveValueTypenow auto-generates (e.g.,IntoActiveValue).
Sources: CLAUDE.md:112-140
Summary: SeaORM relies on a collaborative ecosystem where technical contributions are guided by strict 2.0 architectural patterns and automated sync processes, while community growth is fostered through showcase projects and diverse support channels.
Sources: README.md:435-438, CLAUDE.md:3-5