MatsDK / TauRPC

Typesafe IPC layer for Tauri applications
https://docs.rs/taurpc/
Apache License 2.0
57 stars 1 forks source link

Tauri 2.0 Compatibility #18

Open appinteractive opened 5 months ago

appinteractive commented 5 months ago

Any change this project will work with tauri 2.0 (alpha)?

Currently I get following error:

cargo add taurpc
    Updating crates.io index
      Adding taurpc v0.2.3 to dependencies.
    Updating crates.io index
error: failed to select a version for `raw-window-handle`.
    ... required by package `tauri v1.3.0`
    ... which satisfies dependency `tauri = "^1.3"` of package `taurpc v0.2.3`
    ... which satisfies dependency `taurpc = "^0.2.3"` of package `freelance-metrics v0.0.0 (/Users/Greg/Projekte/Eigenes/FreelanceMetrics/src-tauri)`
versions that meet the requirements `=0.5.0` are: 0.5.0

all possible versions conflict with previously selected packages.

  previously selected package `raw-window-handle v0.5.2`
    ... which satisfies dependency `raw-window-handle = "^0.5"` of package `tauri v2.0.0-alpha.20`
    ... which satisfies dependency `tauri = "^2.0.0-alpha.20"` of package `tauri-plugin-fs v2.0.0-alpha.7 (https://github.com/tauri-apps/plugins-workspace?branch=v2#1b1d795b)`
    ... which satisfies git dependency `tauri-plugin-fs` (locked to 2.0.0-alpha.7) of package `freelance-metrics v0.0.0 (/Users/Greg/Projekte/Eigenes/FreelanceMetrics/src-tauri)`
MatsDK commented 5 months ago

Hi, I tried upgrading tauri to v2.0.0-alpha.20 but it seems like there are some small changes that break TauRPC. I will try to see if there is an easy fix for this sometime. Because I don't know if there are more changes coming to the IPC API in v2.

appinteractive commented 5 months ago

As far as I understand, they are already in the auditing process before beta release. I hope there are no much updates 🤞

MatsDK commented 5 months ago

I create a new branch for this. And I published the taurpc@0.3.0-alpha.1 crate to use TauRPC with tauri v2.0.0-alpha.20. And the client side library can be install with the next tag.

cargo add taurpc@0.3.0-alpha.1
pnpm install taurpc@next // taurpc version 1.5.0
MatsDK commented 3 months ago

Now you can also use tauri v2.0.0-beta.12

cargo add taurpc@0.3.0-alpha.2
pnpm install taurpc@next

If you want to keep using the alpha version of tauri, make sure you install taurpc version 1.5.0 on the client side.

jalcine commented 2 weeks ago

Just checked on this before integrating it with a project of mine. Really nice work!