Skip to content

Rescope unsafe fn blocks#1737

Open
sftse wants to merge 4 commits into
tauri-apps:devfrom
sftse:unsafe-fn
Open

Rescope unsafe fn blocks#1737
sftse wants to merge 4 commits into
tauri-apps:devfrom
sftse:unsafe-fn

Conversation

@sftse
Copy link
Copy Markdown
Contributor

@sftse sftse commented May 25, 2026

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
Copy link
Copy Markdown

socket-security Bot commented May 25, 2026

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
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

Package Changes Through a609e06

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
Copy link
Copy Markdown
Contributor Author

sftse commented May 26, 2026

=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
Copy link
Copy Markdown
Contributor Author

sftse commented May 26, 2026

Let's try.

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.

2 participants