Specta LogoSpecta
1.0.0-rc.x (alpha)

Migrations

Separate the released API from the experimental rewrite.

rspc is no longer maintained. There is no supported upgrade path to a finished 1.0 release. The 1.0.0-rc.x documentation URL is retained for the experimental rewrite; it does not identify the API in the repository's older v1.0.0-rc tags.

Before changing versions

  1. Record the exact versions of rspc, its adapter, Specta, and the frontend packages.
  2. Add a test that builds your router.
  3. Test a query, mutation, error response, and subscription through the actual transport.
  4. Regenerate bindings and type-check the frontend.

From 0.3.0 to the procedure API

The quickstart pins the source revision used by these examples. The main changes are:

0.3.0 APIExperimental procedure API
Router::new().query(name, ...)Router::new().procedure(name, Procedure::builder::<Error>().query(...))
Router-level middlewareProcedure-builder .with(...)
Concrete rspc::ErrorAn application type implementing the rspc::Error trait
.merge("prefix.", router).nest("prefix", router) or unprefixed .merge(router)
.build() returns a router.build() returns Result<(Procedures, Types), _>
Config::export_ts_bindings or router export_tsrspc::Typescript::export_to(path, &types)

Migrate one router module at a time. Keep authentication on a shared procedure builder so every protected procedure opts into it. Recheck public error values because the error model and transport envelopes differ.

Frontend and transport compatibility

The experimental exporter emits a nested Procedures definition. With the default legacy feature, it also emits ProceduresLegacy for the tuple client. Use the type expected by your chosen client.

Do not switch a Tauri server plugin without checking the channel and event protocol difference. Do not assume the Rust client or unfinished middleware became production-ready as part of this rewrite.

There is no documented 0.5.0 migration to apply. Upgrade only to an actual release or a pinned source revision whose behavior you have tested.

Edit on GitHub

Last updated on

On this page