Rent v0.8.16
Rent v0.8.16 brings significant performance improvements to permission-aware reads. In matched benchmarks, fetching a row with its permission flags took 74.9–85.7% less time than in v0.8.15 across all four databases.
Permission-flag latency
| Database | v0.8.15 | v0.8.16 | Lower latency | SQL statements, before → after |
|---|---|---|---|---|
| PostgreSQL | 6.716 ms | 0.958 ms | 85.7% | 17 → 1 |
| MySQL | 7.548 ms | 1.893 ms | 74.9% | 19 → 5 |
| MariaDB | 8.087 ms | 1.922 ms | 76.2% | 19 → 5 |
| SQLite | 1.074 ms | 0.176 ms | 83.6% | 16 → 2 |
Median latency for the same permission-flag workload across three paired runs. Results vary with the application and database setup.
These improvements apply automatically, with no new API or cache setting to adopt. Rent reduces database work while preserving authorization checks.
Typed tenant IDs
Tenant ownership now uses Int, BigInt or Uuid and cannot be changed after
creation. Tenancy remains optional. See
choosing a stable tenant ID
and the tenancy example.
More expressive write permissions
Support unauthored records and control changes to related records with more flexible permission rules. See optional creators and field-level updates.
Reproducible PostgreSQL baselines
Preserve application functions when importing a database, with more faithful imports of indexes, defaults and triggers. See function-aware imports and the PostgreSQL functions example.
Query correction
Nullable tuple filters now handle numeric and UUID keys correctly on PostgreSQL.
Upgrade
Pin the SDK, extension crates and CLI to v0.8.16, regenerate the client, and commit the application lockfile.
String tenant IDs require a schema and data transition. Choose a typed ID, map every existing tenant consistently, and migrate tenant columns, foreign keys and permission-assignment scopes together. Rent does not invent that mapping or convert populated databases automatically. Remove code that tries to change an existing row's tenant. Review foreign-key actions that would mutate tenant keys.
Applications without tenancy do not need to adopt a tenant type. Ordinary transaction callbacks retain the v0.8.15 API. Function export is opt-in, and existing SQL-managed functions can remain in reviewed migrations.
Consumers constructing migration schema structs directly in Rust must supply
new fields such as SqlFunction::body_style and Column::exact_text. Existing
serialized function definitions default to quoted bodies.
