A high-performance Rust ORM framework with compile-time dynamic SQL compilation for zero-runtime-overhead database operations.
Rbatis is a high-performance ORM framework for Rust that compiles dynamic SQL into native Rust code at compile time. It solves the performance overhead of traditional ORMs by eliminating runtime SQL interpretation, offering efficiency comparable to hand-written SQL while providing ORM conveniences like automatic mapping and CRUD generation.
Rust developers building data-intensive applications, such as web backends, microservices, or systems requiring high database performance and concurrency, who need a type-safe and efficient database abstraction layer.
Developers choose Rbatis for its unique compile-time SQL compilation, which delivers zero runtime overhead and hand-written SQL performance, combined with async-first design, extensive database support, and familiar MyBatis-style templating for complex queries.
Compile Time Async Dynamic SQL ORM
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Dynamic SQL is translated to optimized Rust code during compilation, eliminating runtime interpretation overhead and achieving performance equivalent to hand-written SQL, as highlighted in benchmarks.
Supports py_sql, html_sql, and raw SQL, offering MyBatis-like templating for complex dynamic queries, which is familiar for developers from Java/MyBatis backgrounds.
Compatible with multiple databases including MySQL, PostgreSQL, SQLite, and others via modular drivers, with async-first design and efficient connection pooling for high concurrency.
Leverages Rust's ownership model for memory safety and provides macros to automatically generate common CRUD operations, reducing boilerplate code while maintaining type safety.
Relies on procedural macros and external HTML/XML files for SQL templates, which complicates the development workflow, increases build times, and makes debugging more challenging.
Some database drivers like Oracle and TDengine are community-maintained, leading to potential inconsistencies, slower updates, or lack of official support compared to core drivers.
Requires developers to learn py_sql or html_sql syntax on top of Rust, adding an extra layer of complexity compared to ORMs that use plain Rust code for queries.