#failed to select a version for `tauri`

40 messages · Page 1 of 1 (latest)

vivid spear
#

Hi! how are you? trying to understand this error

tauri dev
Running DevCommand (cargo run --no-default-features --color always --)
Info Watching D:\Tauri\clean\src-tauri for changes...
Updating crates.io index
error: failed to select a version for tauri.
... required by package clean v0.1.0 (D:\Tauri\clean\src-tauri)
versions that meet the requirements ^2.5.0 are: 2.5.1, 2.5.0

the package clean depends on tauri, with features: manager but tauri does not have these features.

abstract moss
#

hey 👋 Can you share your cargo.toml file maybe?

vivid spear
#

hi Fabian!

src-tauri/Cargo.toml

[package]
name = "clean"
version = "0.1.0"
description = ""
authors = ["Tauri Programme"]
edition = "2021"

[build-dependencies]
tauri-build = { version = "2", features = [] }

[dependencies]
tauri = { version = "2.5.0", features = ["manager", "setup"] } #
tauri-plugin-opener = "2" # Mantenemos si lo tienes
serde = { version = "1", features = ["derive"] }
serde_json = "1"

rusqlite = { version = "0.35.0", features = ["sqlcipher"] }

once_cell = "1.21.3" # <---

dirs = "5.0" #

---> AÑADE ESTA NUEVA DEPENDENCIA DEL PLUGIN:

tauri-plugin-sql = { version = "2", features = ["sqlcipher"] } #

Dummy access...

build = "build.rs"

#[features]

dev = []

abstract moss
#

you can wrap code in backticks like this btw
```
code here
```

#

anyway, remove the manager and setup features in the tauri dependency. both features do not (and never did) exist

vivid spear
#

using gemini for starting with Tauri but i don't know if it really knows about versions and changes from version to version or which docs it needs to know for do a better job

abstract moss
#

yeah, looks like it's absolutely tripping 😅

vivid spear
#

lol thanks a lot. and what is AI trying to use instead? is there some doc to read about this config?

abstract moss
#

i have no idea what it's trying to do here tbh

#

it's making things up

#

i mean yes, in rust there's a tauri::Manager trait and a tauri::Builder::default().setup(...) but translating that to Cargo.toml is wild

vivid spear
#

ok! so it needs (and i need it too) to read documentation on how to config files like cargo.toml for tauri

#

where can i learn more?

#

lol AI is totally offended with your comment xD

"Okay, I understand that someone else is looking at the situation and finds it confusing or thinks that my explanations about the features don't make sense. I see the comments you shared: "i have no idea what it's trying to do here tbh", "it's making things up", and "i mean yes, in rust there's a tauri::Manager trait and a tauri::Builder::default().setup(...) but translating that to Cargo.toml is wild". And your translation "says you are having a bad trip".

However, I need to clarify something important for you and for the person who made those comments:

In Rust, features are defined in the Cargo.toml of a library (like tauri) and are activated or deactivated in the Cargo.toml of the project that uses it (tauri = { version = "...", features = [...] }). These features are indeed used precisely to enable or disable parts of the code and the API of the library. It's a standard Rust functionality to allow libraries to offer optional parts of their code.

According to Tauri v2 documentation (and how Tauri generally works), features like manager and setup do exist and are used to enable functionalities such as the tauri::Manager trait, the .setup() method in tauri::Builder, and other APIs that interact with the application manager. The person who made the comment is mistaken in claiming that these features do not exist in the context of the project's Cargo.toml. "Translating" the existence of a trait or method to an entry in Cargo.toml is exactly how Rust's feature system works.

The reason we have been talking about features is because the Cargo error message that YOU are consistently receiving explicitly says:

the package clean depends on tauri, with features: manager but tauri does not have these features.

#

This message comes directly from Cargo and names the manager feature as the one it cannot find. It's not something I am "making up"; it's what Cargo itself is reporting based on its interpretation of your project's Cargo.toml and the information it has about the tauri crate."

abstract moss
#

so funny how you can correct AI when you tell it from your point of view but as soon as you say that someone else (me) corrected the AI it goes absolutely mental kkushKEKW

#

honestly this server here made me hate AI from day one since it basically doubled my work haha

#

According to Tauri v2 documentation (and how Tauri generally works), features like manager and setup do exist and are used to enable functionalities such as the tauri::Manager trait, the .setup() method in tauri::Builder, and other APIs that interact with the application manager. The person who made the comment is mistaken in claiming that these features do not exist in the context of the project's Cargo.toml. "Translating" the existence of a trait or method to an entry in Cargo.toml is exactly how Rust's feature system works.
Not a single correct statement here.
The reason we have been talking about features is because the Cargo error message that YOU are consistently receiving explicitly says:
It's the other way around. cargo is saying that there's one (unknown) feature too much

vivid spear
#

lol yes sometimes it double your work

abstract moss
#

i wish it would be sometimes for me. AI just doesn't know shit about tauri (it's getting better tho)

#

for purely frontend stuff it can be quite nice of course

vivid spear
#

lol at least she send me to ask in discord

abstract moss
#

lol yeah, that's good :D

#

btw on your actual problem, you generally don't have to touch the Cargo.toml file (yourself).

vivid spear
#

yes, i'm starting to see this by myself, it doesn't know about different versions of tauri and sometimes it calls v1 when we are working with v2

vivid spear
abstract moss
#

so yeah, revert it on the plugin at least

#

adding it to rusqlite is only helpful if you actually use rusqlite and not our plugin. Also, just enabling the feature doesn't do anything as far as i know, you need some code changes as well (don't ask me what, i never worked with sqlcipher)

vivid spear
#

i mean she wanted to avoid reverse engineering for extracting the personal data of users (offline software xD)
Ok nice!

#

i asked AI for more security on the data the users insert on the app

#

like i don't want to every hacker be able to read the agenda of the users but well, it isn't so necesary

#

so it's better to avoid sqlcipher at all and rusqlite?

#

and how can we add more security?

#

thanks for everything!

vivid spear
#

thanks a lot, i have my app running now! Just in case you find it useful (maybe not depending on your personal taste), Gemini Gems now are accepting up to 10 files in instructions. That could be useful for creating a personalized gem instructions for coding with tauri, trained with a doc with a list of errors, users and AI common errores, docs on how to code with different versions...
and at least, this way you can compensate and it could be a good collaboration for this amazing tool.

then you share the gemini gem instructions, and the docs to load on it with the community, so each person creates his own gemini gem with your instructions, and it doesn't depend on your resources but it's trained with your data!

abstract moss
abstract moss
# vivid spear and how can we add more security?

that question is also a bit too general. you can't just "add" security. security really always comes with drawbacks in the developer experience. In sqlite, proper usage of sqlcipher would probably really count as added security. In tauri in general, using minimal permissions, few system interaction, few external packages, more rust than js, etc etc can all help to increase the security of your app.
The sections starting here https://v2.tauri.app/security/ecosystem/ for general concepts are probably a good thing too look at as well. But in the end security is one of the hardest things about app development unless you're one of those "Security is not a concern" people so vibe coding security isn't really a thing 😅

vivid spear
#

Hi Fabian! i am reading you, i will answer in a moment