Skip to content

chore(deps): Upgrade to ndk 0.9 and fix thread-safety interactions - #956

Merged
amrbashir merged 1 commit into
tauri-apps:devfrom
MarijnS95:ndk-0.9
Jul 18, 2024
Merged

chore(deps): Upgrade to ndk 0.9 and fix thread-safety interactions#956
amrbashir merged 1 commit into
tauri-apps:devfrom
MarijnS95:ndk-0.9

Conversation

@MarijnS95

Copy link
Copy Markdown
Contributor

Closes #807
Closes #808
Closes #955

Most changes were copied over from my wry PR at tauri-apps/wry#1296. Most notably a &ThreadLooper is now passed to wry::android_setup() because we have one, and it gives important safety guarantees when it comes to registering callbacks on this looper, without (unnecessarily!) requiring Send. A thread-local requirement already exists for the JNIEnv that is passed around anyway.

Also note that certain workarounds and illogical inverted passes around key_code() handling are no longer needed, as the ndk crate now passes an enum with the raw i32 around so that the .into() conversion for i32 (the correct type) now becomes lossless.


In the end I'm also quite surprised how many linter warnings trigger in this crate, which don't seem to be down to just linting on an older Rust toolchain?

@MarijnS95
MarijnS95 requested a review from a team as a code owner July 17, 2024 10:43
@github-actions

github-actions Bot commented Jul 17, 2024

Copy link
Copy Markdown
Contributor

Package Changes Through f396851

There are 1 changes which include tao 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
tao 0.28.1 0.29.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

@amrbashir amrbashir left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add a change file in .changes directory?

Comment thread examples/transparent.rs
Comment on lines +5 to 6
#[cfg(windows)]
use std::{num::NonZeroU32, rc::Rc};

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that there are many more "unused import" warnings like this: why the CI not catching those?

Comment thread .changes/ndk-0.9.md Outdated
Most changes were copied over from my `wry` PR at
tauri-apps/wry#1296.  Most notably a
`&ThreadLooper` is now passed to `wry::android_setup()` because we
have one, and it gives important safety guarantees when it comes to
registering callbacks on this looper, without (unnecessarily!) requiring
`Send`.  A thread-local requirement already exists for the `JNIEnv` that
is passed around anyway.

Also note that certain workarounds and illogical inverted passes
around `key_code()` handling are no longer needed, as the `ndk` crate
now passes an `enum` with the raw `i32` around so that the `.into()`
conversion for `i32` (the correct type) now becomes lossless.
@amrbashir
amrbashir merged commit f575619 into tauri-apps:dev Jul 18, 2024
@amrbashir

Copy link
Copy Markdown
Member

Thank you

@github-actions github-actions Bot mentioned this pull request Jul 16, 2024
@MarijnS95
MarijnS95 deleted the ndk-0.9 branch July 18, 2024 12:09
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