Skip to content

Rescope unsafe fn blocks - #1737

Merged
Legend-Master merged 5 commits into
tauri-apps:devfrom
sftse:unsafe-fn
Jun 10, 2026
Merged

Rescope unsafe fn blocks#1737
Legend-Master merged 5 commits into
tauri-apps:devfrom
sftse:unsafe-fn

Conversation

@sftse

@sftse sftse commented May 25, 2026

Copy link
Copy Markdown
Contributor

To narrow down the causes of the observed crashes, let's rescope the unsafe use to a smaller area.

Objc2-foundation made mostsome of its bindings safe, so here is a first batch of changes.

Most of the diff is dumb indentation changes, split out as a fmt commit.

@sftse
sftse requested a review from a team as a code owner May 25, 2026 11:23
@socket-security

socket-security Bot commented May 25, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedobjc2-app-kit@​0.3.0 ⏵ 0.3.210010093100100
Updatedobjc2-core-foundation@​0.3.0 ⏵ 0.3.210010093100100
Updatedobjc2-foundation@​0.3.0 ⏵ 0.3.210010093100100
Updatedobjc2-ui-kit@​0.3.0 ⏵ 0.3.210010093100100
Updatedobjc2-web-kit@​0.3.0 ⏵ 0.3.210010093100100

View full report

@github-actions

github-actions Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Package Changes Through 31044a2

There are 1 changes which include wry with minor

Planned Package Versions

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

package current next
wry 0.55.1 0.56.0

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


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

@FabianLars

Copy link
Copy Markdown
Member

Objc2-foundation made most of its bindings safe

iirc at least some of that (thinking of all objc2 crates) wasn't in 0.6.0 / 0.3.0 so we should probably increase the minimum patch version of the objc2 crates or check if =0.3.0 still compiles

@sftse

sftse commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

=0.3.0 would not compile. I think the logic of the change is that making methods safe is purely backwards-compatible.

I did a rough smoke-test to check what cargo does. If we do note the patch version explicitly in the Cargo.toml, as done in this PR, it seems to treat it as a hard >=0.3.2 constraint, so dependency alignment means any downstream consumer of wry will update their locked version to >=0.3.2.

I think this update could only cause problems if we have a floating patch number like 0.3 in wry's Cargo.toml.

@FabianLars

Copy link
Copy Markdown
Member

ay sorry, the cargo.toml change didn't load on my phone. didn't notice that you already upped the version. Do any of the other objc2 crates need a bump as well?

@sftse

sftse commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

Let's try.

@Legend-Master
Legend-Master merged commit 6ef93b3 into tauri-apps:dev Jun 10, 2026
21 checks passed
@sftse
sftse deleted the unsafe-fn branch June 25, 2026 10:07
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.

3 participants