-
-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(deps): Upgrade to ndk 0.9
and delete unused ndk-sys
/ndk-context
dependencies
#1296
Conversation
let mut pipe: [RawFd; 2] = Default::default(); | ||
unsafe { libc::pipe(pipe.as_mut_ptr()) }; | ||
pipe | ||
unsafe { pipe.map(|fd| OwnedFd::from_raw_fd(fd)) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be more convenient to use rustix
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's keep what works for now, I'd rather migrate to something based on android-activity crate in the future.
Package Changes Through fc4d54aThere are 1 changes which include wry with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, just waiting for tauri-apps/tao#955
00f4d08
to
58263c1
Compare
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.
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.
ndk 0.9
and delete unused ndk-sys/context
dependenciesndk 0.9
and delete unused ndk-sys
/ndk-context
dependencies
There was a problem hiding this comment.
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?
19fa538
to
3773ee3
Compare
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.
The `ndk` crate received some marginal API upgrades, besides fixing soundness issues. Specifcally, `ForeignLooper::add_fd_with_callback()` now signifies that the incoming file descriptor is a `BorrowedFd` and the callback is executed on a different thread (where the looper is polled on the `ThreadLooper`) and must hence be `Send.`. It appears the `ndk-sys` and `ndk-context` crates are not used directly, hence they are removed from `Cargo.toml` here.
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.
…956) 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.
thank you |
Closes #1060
Closes #1061
The
ndk
crate received some marginal API upgrades, besides fixing soundness issues. Specifcally,ForeignLooper::add_fd_with_callback()
now signifies that the incoming file descriptor is aBorrowedFd
and the callback is executed on a different thread (where the looper is polled on theThreadLooper
) and must hence beSend.
.It appears the
ndk-sys
andndk-context
crates are not used directly, hence they are removed fromCargo.toml
here.