Rent v0.8.11
Rent v0.8.11 reduces repeated generated Rust and adds two ways to express common application behavior directly in the schema and query API.
Smaller generated clients
Generated clients share more query, mutation, cursor and bulk-operation code across access modes. Existing typed methods and permission boundaries remain available. Regenerate your clients to receive the smaller output. Build-time improvements depend on the schema and how the application uses the generated API.
Keep bookkeeping separate from edit timestamps
Maya's post should retain its edit time when a background job increments a view counter:
view_count BigInt @default(0)
edited_at DateTime @updatedAt(ignore: [view_count])An update supplying only excluded fields leaves the timestamp unchanged. A mixed update that also supplies content refreshes it. Atomic increments and each keyed-bulk input follow the same rule. Explicit timestamps still win.
Plain @updatedAt keeps its existing behavior. Timestamp exclusions are independent
of @@rent.version(ignore: [...]) and do not require versioning. With exclusions
configured, an empty compare-and-swap does not refresh the timestamp.
Like other generated defaults, this decision uses the submitted mutation before hooks run. A hook adding a content edit must also supply its intended timestamp. See automatic values and the optimistic-locking example.
Filter out related matches
Find posts without an archived tag, or without any visible tags:
let active = client
.post()
.where_no_tags(|tags| tags.name_eq("archived"))
.all()
.await?;
let untagged = client.post().lacks_tags().all().await?;These filters use NOT EXISTS, support nullable and compound relationships, and
compose with ordering and pagination. They retain related-model and join-model read
permissions. Hidden rows do not count as matches, while permission-evaluation errors
still fail the request. See relationships
and the many-to-many example.
Field-permission reuse with unrelated views
An unrelated read-only view no longer prevents eligible internal field-update rules from reusing permission evidence within an operation. This extends the view-independent reuse introduced in v0.8.10 to field grants and final-value guards. Rules that depend on views retain their conservative behavior.
Upgrade
Use v0.8.11 for the CLI and every Rent crate, regenerate each configured client, and commit your application's lockfile. These changes do not themselves require a database migration. Review any separately introduced schema changes normally.
Detailed instrumentation remains opt-in. --release controls optimization and does
not disable an explicitly enabled instrumentation feature. See
runtime observability.
