Skip to content

v0.1.3

Compare
Choose a tag to compare
@oscartbeaumont oscartbeaumont released this 05 Mar 14:48

Fixes:

Changes

  • Specta has been relocated from the specta subdirectory to oscartbeaumont/specta
  • Specta has been upgraded to v1.0.0
  • Support for Axum v0.6
  • Multithreaded Tauri executor
  • Upgraded all Rust and backend deps
  • Remove async-stream dependency

Breaking changes

Axum integration

When upgrading you will get the error expected struct "MethodRouter", found struct "axum::Router". To fix this you need to update your code as follows:

+ use rspc::integrations::httpz::Request;

-  .route(
    "/rspc/:id",
+  .nest(
    "/rspc",
    router
-        .endpoint(|path: Path<String>| {
-            println!("Client requested operation '{}'", *path);
+        .endpoint(|req: Request| {
+            println!("Client requested operation '{}'", req.uri().path());
            ()
        })
        .axum(),
)

If you were using a full Axum extractor, support for them has been deprecated as Axum 0.6 has broken the way it works. Please refer to this example for the workaround to use an Axum extractor. This workaround will be removed in the future so please open a GitHub issue to let me know your usecases for it!

Merge behavior

The behavior .merge has changed. If you want to restore the old behavior rename .merge to .legacy_merge. I am going to drop .legacy_merge in a future update so please open a GitHub Issue if you have a use case that doesn't work with .merge.

Other Dependencies

You may be required to upgrade over dependencies such as:

  • Tokio
  • Axum

I would highly recommend installing cargo-edit and running cargo upgrade --compatible --recursive to upgrade everything.