Skip to content

fix(cli): don't force native-tls feature on desktop#12445

Merged
FabianLars merged 6 commits intodevfrom
fix/nativetls
Jan 25, 2025
Merged

fix(cli): don't force native-tls feature on desktop#12445
FabianLars merged 6 commits intodevfrom
fix/nativetls

Conversation

@FabianLars
Copy link
Member

@FabianLars FabianLars commented Jan 19, 2025

this caused issues 2 or 3 times on discord now and since we use reqwest only on mobile it really doesn't make sense, especially considering that the http plugin etc all set rustls as default.

i also changed the deps in tauri to declare reqwest as a mobile only dependency.

Edit: fixes #12448

@FabianLars FabianLars requested a review from a team as a code owner January 19, 2025 16:57
@github-actions
Copy link
Contributor

github-actions bot commented Jan 19, 2025

Package Changes Through 94d732f

There are 4 changes which include tauri-bundler with patch, tauri-cli with patch, tauri with patch, @tauri-apps/cli with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri-bundler 2.2.2 2.2.3
tauri 2.2.3 2.2.4
@tauri-apps/cli 2.2.5 2.2.6
tauri-cli 2.2.5 2.2.6

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@amrbashir amrbashir requested a review from lucasfernog January 19, 2025 20:28
@FabianLars
Copy link
Member Author

actually, since we forcefully enable rustls-tls on mobile instead of checking it first like on desktop we could just as well "hardcode" it in the reqwest dependency here, no?

@FabianLars
Copy link
Member Author

after a tiny bit of research it seems like native-tls on mobile is nothing but a headache and rarely works so i just so i just enabled the feature permanently which effectively doesn't even change anything except the timing of when the feature is enabled.

i also have a few devs on this branch already with no issues reported so far. I'd really like to get this into the patch release i wanted to do this week tbh 😅

@thomaseizinger
Copy link
Contributor

except the timing of when the feature is enabled.

But it is still removed on Desktop, right?

@FabianLars
Copy link
Member Author

yes and no. It should show up in your lockfile, but not like on build time as it did before(?) but when you add tauri to cargo.toml.
It will only actually be used when building for mobile though.

Is that a problem for your use case?

@FabianLars
Copy link
Member Author

Ahh i just noticed that i phrased my earlier comment very poorly. The native-tls flag is still completely gone, it's the rustls-tls flag that's always enabled now (but only used on mobile)

@thomaseizinger
Copy link
Contributor

The issue we have is that in order to fully support offline builds, we need to add the native-tls feature flag which brings in OpenSSL, despite nothing in our stack using OpenSSL (on purpose).

@FabianLars
Copy link
Member Author

okay so if nothing changed from what i've heard in firezone/firezone#7799 & #12448 the last changes will still work for you without needing the native-tls flag, but it will now behave as if you had added the rustls-tls feature flag if tauri-cli's feature detection wasn't broken. Compared to no feature flag like it kinda behaved in my first commit.

@thomaseizinger
Copy link
Contributor

Okay that makes sense, thank you! We already depend on rustls-tls so this is fine.

@FabianLars FabianLars merged commit 27096cd into dev Jan 25, 2025
27 checks passed
@FabianLars FabianLars deleted the fix/nativetls branch January 25, 2025 10:27
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

Successfully merging this pull request may close these issues.

[bug] undeclared hyper-tls dependency of tauri causes failure with offline builds

3 participants