# rbatis/rbatis

Compile Time Async Dynamic SQL ORM

Repository: https://github.com/rbatis/rbatis
Canonical: https://ross.abutalabs.com/products/rbatis
Homepage: https://rbatis.github.io/rbatis.io
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: orm, mysql, postgres, sqlite, mybatis, mybatis-plus, duckdb, pg, truso, mssql, cockroachdb, mariadb, oracle, tdengine, tidb, tokio, mybatis3
Last push: 2026-08-26T15:25:12+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 95, longevity 100
- inputs: {"age_days": 2735, "days_push": 7, "days_rel": 35, "gap_med": 6.0, "n_releases_24m": 45}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2486, forks 172 (observed 2026-08-28T04:06:55.578746+00:00)

## What it is
Rbatis is a high-performance async ORM framework for Rust that compiles dynamic SQL (py_sql/html_sql) to native Rust code at compile time. It supports many databases including MySQL, PostgreSQL, SQLite, MSSQL, and more, with built-in connection pooling on the Tokio async runtime.

## Use cases
- use an async orm in rust
- write dynamic sql with mybatis-style xml tags in rust
- map rust structs to database tables
- avoid runtime sql parsing overhead
- connect to mysql or postgres from a rust web service
- port a mybatis-plus project to rust

## When to choose
- you want mybatis-like dynamic sql in rust with compile-time performance
- you need async database access across many database engines
- you prefer sql templates over query builders

## When to avoid
- you want a lightweight query builder like sqlx or sea-orm without template macros
- your project does not use tokio-based async rust
- you need an orm for a language other than rust

## Facets
- artifact type: library
- maturity: active
- function: orm, database-driver, database
- domain: databases, web-development, backend, developer-tools
- platform: rust, cross-platform
- tags: async, tokio, mybatis, dynamic-sql, compile-time-codegen, mysql, postgres, sqlite, connection-pool

## Member repositories
- rbatis/rbatis (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:55.578746+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:28:02.830368+00:00, confidence not recorded.
  - readme: https://github.com/rbatis/rbatis (fetched 2026-08-28T04:06:55.578746+00:00, sha 0483b037f26a)
  - homepage: https://rbatis.github.io/rbatis.io (fetched 2026-08-29T10:09:53.858436+00:00, sha 9d6409e819c0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
