rent generate
Use rent generate after changing an entity field, relationship, index, version field, or generated-client option. Generation is explicit and replaces the target atomically, so callers never observe a partially generated client.
Generate with conventional paths
rent generateSuccessful generation names the refreshed target:
Generated ./rent/generatedA User/Post/Comment schema produces this tree, with one set of model, create, query, update, delete, mutation, and predicate files per model:
rent/generated/.rent-generated
rent/generated/.rent-schema-fingerprint
rent/generated/client.rs
rent/generated/error.rs
rent/generated/internal/schema.rs
rent/generated/migration_metadata.rs
rent/generated/mod.rs
rent/generated/rent.rs
rent/generated/user.rs
rent/generated/user_create.rs
rent/generated/user_delete.rs
rent/generated/user_mutation.rs
rent/generated/user_predicate.rs
rent/generated/user_query.rs
rent/generated/user_update.rs
rent/generated/post.rs
rent/generated/post_create.rs
...Compile the application immediately afterward to catch integration mistakes:
rent generate
cargo check Checking blog-api v0.1.0 (/work/blog-api)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.42sUse custom directories
rent generate --schema crates/domain/rent/schema.rsl --target crates/domain/src/generatedUse custom paths in a workspace that keeps its RSL schema in a domain crate. Relative paths are resolved from --root.
Regenerate while editing
rent devGenerated ./rent/generated
Watching ./rent/schema.rsl
Regenerated ./rent/generatedDevelopment mode performs an initial generation, monitors RSL schema content, and regenerates atomically after a change. Invalid intermediate edits are reported without terminating the watcher, so saving a corrected schema resumes the loop.
rent generate --watch remains an equivalent spelling for scripts that prefer to keep the action under the
generate command.
Validation failures
Generation stops before replacing the existing client when a field names a type the schema does not declare or the schema violates a cardinality rule. The error carries the file position and the diagnostic code:
Error: ./rent/schema.rsl:16:10 [RSL203] unknown scalar type `Author`