Migrating from 0.2.x to 0.3.0
Upgrade an existing Reinhardt application from the 0.2 release line to 0.3.0.
Migrating from 0.2.x to 0.3.0
Reinhardt 0.3.0 removes the remaining 0.2 compatibility APIs and finalizes the Pages, dependency injection, routing, model-info, and migration surfaces that were stabilized through the release-candidate line.
The repository-level instructions/MIGRATION_0.3.md guide remains the source of truth for exhaustive project-maintainer checks.
Recommended Order
- Update
Cargo.tomlto the target 0.3 release. - Replace removed 0.2 compatibility APIs.
- Migrate dependency providers that need explicit keyed identity.
- Replace raw server route registration with endpoint metadata.
- Review generated model-info relation fields and DTO conversions.
- Update Pages apps to the split client/server layout.
- Regenerate migrations and review the generated diff.
- Run the verification commands from the complete guide.
Key Changes
| Area | Migration action |
|---|---|
| Auth extractors | Replace AuthUser<U> with CurrentUser<U>. |
| Pages resources | Replace create_resource* with use_resource(fetcher, deps). |
| Effect callbacks | Replace use_effect_event* with use_callback* or .get_untracked() inside effects. |
| URL routing | Replace raw .function(...), .route(...), and method handler registration with endpoint macros plus .endpoint(...). |
| Dependency injection | Use FactoryOutput<K, T> and Depends<K, T> when the output value type is not a unique dependency identity. |
| Pages layout | Move route wrappers under app-local client/components/, split server/client modules, and use urls/client_router.rs plus urls/server_router.rs. |
| Model info | Review relation fields that now expose RelationInfo<T> or ManyToManyInfo<Source, Target>. |
| Migrations | Regenerate migrations after relation metadata, field rename, or constraint changes. |
Verification
Start with narrow scans so removed API references are visible before running the full project gates:
APP_PATHS="src"
rg -n "AuthUser|create_resource|create_resource_with_deps|use_effect_event|use_effect_event_with" $APP_PATHS
rg -n "\\.(function|route|handler_with_method)(_named)?\\(|FunctionHandler|Depends(Result|Option)" $APP_PATHS
rg -n "pages\\.rs|server_urls|client/pages|src/shared/(forms|types)\\.rs" $APP_PATHS
./scripts/validate-version-markers.sh
git diff --checkThen run the relevant Rust documentation and lint gates:
cargo make fmt-check
cargo make clippy-check
cargo test --doc
cargo doc --no-deps