Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using tauri-specta with tauri v2 #62

Closed
gagarin55 opened this issue Nov 9, 2023 · 8 comments
Closed

Using tauri-specta with tauri v2 #62

gagarin55 opened this issue Nov 9, 2023 · 8 comments

Comments

@gagarin55
Copy link

tauri-specta v2 has dependency on tauri v1.

Is it possible to use tauri-specta with tauri v2 ?
Otherwise I have error:

error: failed to select a version for `tauri-plugin-window`.
    ... required by package `ergo-wallet v0.2.0 (/home/desktop/src-tauri)`
versions that meet the requirements `^2.0.0-alpha` are: 2.0.0-alpha.2, 2.0.0-alpha.1, 2.0.0-alpha.0

the package `tauri-plugin-window` links to the native library `gdk-3`, but it conflicts with a previous package which links to `gdk-3` as well:
package `tauri v1.5.1`
    ... which satisfies dependency `tauri = "^1.5.1"` of package `tauri-specta v2.0.0-rc.2`
    ... which satisfies dependency `tauri-specta = "=2.0.0-rc.2"` of package `ergo-wallet v0.2.0 (/home/desktop/src-tauri)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='tauri-plugin-window' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

Best regards,

@seanaye
Copy link

seanaye commented Nov 26, 2023

Did you ever figure this out? I'm getting the same issue

@dfrnoch
Copy link

dfrnoch commented Dec 5, 2023

🙏

@gagarin55
Copy link
Author

Any news about it ?

@oscartbeaumont
Copy link
Member

You can try this branch, if you need a different version of the Tauri alpha your on your own to fork Tauri Specta & Specta.

Be aware if your using rspc, Prisma Client Rust or other libraries that depend on Specta they will probably not work with this patch.

https://github.com/oscartbeaumont/tauri-specta/tree/tauri2-alpha18

@oscartbeaumont
Copy link
Member

I don't have the option to support both Tauri stable and Tauri alpha in proper releases due to Cargo complaining about double-linking webkit.

I suspect when specta-rs/specta#185 lands there might be a better way to support both but I don't know how that will fit in with tauri-specta as that only deals with Specta itself.

@appinteractive
Copy link

any updates on that issue? would love to use it with tauri v2

@oscartbeaumont
Copy link
Member

No updates. There is still the tauri2-alpha18 branch you could try using with a Git patch however i'm not sure that branch has correctly updated the JS-side of things so you might run into problems with that, although a PR would be accepted with any fixes!

@oscartbeaumont
Copy link
Member

I have just implemented this in main. Will release once #86 is fixed but it's usable in your own apps as long as your not using Tauri Specta within a Tauri plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants