-
Notifications
You must be signed in to change notification settings - Fork 110
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
what's the plan on binder? #490
Comments
found this commit which removed all binder APIs from ndk-sys 63cbffa So they are not there because they include 'c++ like directives'. Not sure what this means. The Binder API look pretty C to me. Perhaps if I try to build it myself I can find why. |
This commit doesn't remove any binder API from
Do you have any source to back this up? Some but not all of these files are C++-only and cannot be wrapped using our C-only The files that can however be wrapped are enabled on some of these branches, with a few prototypes to extend the None of that gained any traction though, as Google already has quite "mature" According to a recent crate search @maurer and @emarteca just published the exact same thing 5 days ago. Without a repository link it's still quite easy to browse the source and see that it's also a copy of the AOSP code. EDIT: Looking further, these two GitHub accounts turn out to be associated with Googlers that are making the upstream crate publishable directly to crates.io: https://cs.android.com/android/_/android/platform/frameworks/native/+/75d711270053226fea61534cac871d8967adb744. While this looks like official Google/Android-provided bindings and saves everyone from having outdated community I'm happy to work together with anyone to land proper |
We're not ready to make the Overall, we would like With regards to parcel functions on specific types, those should mostly be useful through integration with AIDL, yes? AIDL expects those to be exported safely. I can't promise anything here, but would it be helpful if these libraries had a similar unsupported export? The downside with either Is there something that your users want binder for aside from AIDL usage? |
@maurer that's completely understandable and I'm already more than happy to receive a response at all from a Googler. We've had similar discussions around the linked If there's one suggestion I can make right now, it's to add Thanks for the links regarding safely parceling specific types. So if the
What exactly do you mean with "similar unsupported export"; publishing Hence why I want to be early in discussing code shareability for the NDK Rust wrappers as it is used both internally in AOSP as well as available to Rust-built apps. Rather than both building the exact same thing. I am not sure what users want. @suguruwataru who opened this issue did not specify. Personally, as a maintainer of this |
FWIW the C++ parts of the binder "API" are not actually API. It's all inline helper stuff for aidl afaik. Those headers shouldn't have actually been shipped in the first place, but it took a while to clean up the dependencies on them that of course sprang up immediately. r28 doesn't include them any more. It wouldn't make much sense to |
@DanAlbert yes, there is a reason why MarijnS95@935851d didn't enable those headers. Haven't found a need for |
Ack. My misunderstanding here...
No... I just took a quick look at https://developer.android.com/ndk/reference/group/ndk-binder and didn't find anything that looked very C++ only to me. Possibly that's relevant to what @DanAlbert said. If those C++ parts are not supposed to be exposed it make sense they don't make a big appearance in docs.
I am writing multiple apps that communicate with each other, and was very happy to see Binder which looks like a great IPC mechanism. Those apps are mostly written in Rust so it would be great if I can just use the ndk crate to use Binder. Also Binder is how IPC "should" be implemented on Android. Android forbids other mechanisms like unix domain sockets, and any background app that isn't bound to a foreground app using the "bound service" mechanism can get killed. Using Binder immediately both prevents the background side of the IPC from getting killed and creates a channel for communication. |
It makes sense to use I've successfully written some Unfortunately as alluded to above, while this "official" implementation in-sync with what AOSP is using internally is nice and future-proof, there is no easily-accessible GitHub/GitLab-like place to converse with Googlers and moreover submit code improvements. I'd have loved to ask some questions, discuss improvements / request changes, and submit missing bits such as implementations for |
NDK has native Binder API
https://developer.android.com/ndk/reference/group/ndk-binder
But a quick search in the crate docs doesn't find any binder related items. I'm guessing it's just not supported at this moment?
The text was updated successfully, but these errors were encountered: