Welcome
Introduction to Rent
Rent is a Rust-native relational database toolkit. Describe your application's data in RSL, generate a type-safe async Rust client, and review SQL migrations as your schema grows. You can also model who can access that data: keep a post private, share it with a colleague, or let documents inherit their workspace's permissions. Permissions are optional.
Rent supports PostgreSQL, MySQL, MariaDB, and SQLite. It includes typed CRUD, relationships and eager loading, transactions, optimistic locking, pagination, streaming, optional relationship permissions, reusable model mixins, migration safety, and first-class packages for useful PostgreSQL extensions.
Explore what you can build with Rent:
- RSL schemas — describe your models, fields, and relationships.
- Generated Rust clients — turn your schema into a type-safe async API.
- Typed CRUD — create, read, update, and delete your application's data.
- Relationships and eager loading — connect models and fetch related data together.
- Transactions — save related changes as one unit.
- Optimistic concurrency — catch conflicting edits before overwriting them.
- Pagination and streaming — page through results or process them in batches.
- Tenancy — keep each customer's data within its own boundary.
- Relationship permissions — express ownership, sharing, and inherited access.
- Reusable model mixins — share common fields across models.
- SQL migrations — review and apply changes as your schema evolves.
- Database support — work with PostgreSQL, MySQL, MariaDB, or SQLite.
- PostgreSQL extensions — add queues, vectors, geospatial search, and more.
- What's new — explore recent capabilities and upgrade guidance.
The shortest path to a running application
After installing the CLI, SQLite gives you a complete first run without Docker:
rent new social-app --database sqlite
cd social-app
rent doctor
rent migrate dev --name initial
cargo runThat path creates a central RSL schema, generates the typed Rust client, writes and applies the first checksummed migration, and connects a Tokio application to the resulting database.
Continue with Your first app for the full walkthrough. Then follow Learn by example to build on these ideas, or choose a task guide in Using Rent.
