ReferenceCommand line
rent seed
rent seed runs a Rust binary from your application. The seed program uses the same generated client, configuration, policies, and transaction behavior as the rest of your code.
Conventional seed binary
Create src/bin/seed.rs, then run:
rent seedThis executes cargo run --bin seed from the project root. If the seed binary fails, Rent reports its exit status and
exits unsuccessfully itself.
Compiling social-api v0.1.0 (/work/social-api)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.58s
Running `target/debug/seed`
inserted 12 users, 48 posts, and 173 commentsRent streams the seed program's output directly, so application progress and tracing events remain visible.
Select a package and binary
rent seed --package social-api --bin bootstrapUse --release when the seed performs a large import:
rent seed --bin import_catalog --releaseForward application arguments
Arguments after -- are passed to the seed binary unchanged:
rent seed --bin bootstrap -- --tenant acme --users 500Keep destructive reset behavior inside the application binary, where it can require environment-specific confirmation and use a transaction.