-
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
discussion for moving the rust on android ecosystem forward #365
Comments
Thanks for starting this discussion. I had recently been wondering if we could modularize the That way we could perhaps "archive" the monolithic repo. In the case of ndk-glue / ndk-macros I suppose it could be a separate question whether to split those out and then immediately archive or else could simply end up archived as part of the monolithic repo. For |
since it sounded like there was some agreement on the idea (from the other threads too that lead us to this issue) I think for starters I'll take a stab at filter branching |
As I said I'm mostly interested in maintaining xbuild as the defacto tool for building and deploying cross platform rust applications. The main blocker so far was no real rust gui framework. But for now I think dioxus is good enough and in a few years glacier/piet-gpu/xilem will probably be the way to go. I can continue maintaining it in the cloudpeers repo for now, as it seems that @MarijnS95 and @rib only care about android at the moment. Yeah there is a lot of experimental code in xbuild, but the android and iOS parts are getting thoroughly tested and used and improved. |
I wonder if an organisation that was framed more like "Mobile Rust" might be more practical than one that is android specific? considering how common it would be to want to make crates that are useful cross-platform? |
Okey for reference it was pretty straightforward to filter out each android-ndk-rs project, and initial repos can be seen here: https://github.com/Android-Rust This is how I filtered them all: git-filter-repo(nicer than using
ndk-sys(takes into account that the code originally moved from
ndk(takes into account that the code originally moved from
cargo apk
ndk-build
ndk-glue
ndk-macro
ndk-context
|
@rib heh I intended to name it I'm fine to start and drop More importantly for me however: we should nuke #126 |
okey, I've sent owner invites for that org, and I guess we can decide whether that seems like the right direction vs e.g. leaving the repos under the rust-windowing org or not splitting these out etc |
Yeah we can rename. I was also pondering the more general "Mobile Rust" or "Rust Mobile". |
(we can also just delete crates like ndk-glue / ndk-macro if we figure it's fine that they are archived in the original repo) |
Do other people feel this way about |
in my opinion you should drop |
but yeah extending |
(I cannot give detailed responses now, expect more detail in an hour) @dvc94ch your link doesn't render correctly. @rib I'd still prefer to bundle relevant repos together, if possible. Ndk+ndk-sys, and cargo-apk+ndk-build. Ndk-glue and ndk-macros can remain here to get their deprecation marks and be ultimately removed. Not sure how to deal with open PRs though; merge them here and bring the result to the new org? For starters we can also transfer the entire repo to the new org and leave the split for some time later. |
agree with @MarijnS95. would be a shame to loose all these stars. I think ndk+ndk-sys+ndk-context+ndk-examples should stay in this repo and we should transfer this one. those are the only parts I still care about. I guess before we do anything we need to answer these questions:
|
(Am on mobile atm so quick replies) Ndk-sys combined with ndk makes sense yeah. I was wondering if With ndk-context that crate has been a really useful solution for decoupling library creates than need to use JNi from the glue crate. It's true that it still imposes limits atm on supporting multiple activities but I'm not sure of a good solution that can keep libraries decoupled from the glue, or having to make assumptions about running as part of a standalone native app vs being used as part of an embedded library. Maybe ndk context needs to support attaching the Activity to thread local storage somehow? |
@dvc94ch if you write the link label like Yes, this may be a success story, but we'd have to pass a different activity/context to it somehow. Funnily enough your example link shows a very similar workaround for Termux when compiling for Android but no
Right, don't forget about the stars, watchers, and open and past issues+PRs.
I'd say this depends on their usecase:
These borders can muddy over time when more combinations start to be supported by e.g.
Perhaps just host the
👍
Not sure if this really matters. The crate has always been published to crates.io and could be used by anyone, it being developed in more-or-less monorepo style shouldn't be that big of a barrier for contributions - but it does make it more inviting to apply breaking changes to It was always the idea to make
This is always a problem; whether to arrange inter-crate communication behind a users back and simplify for the generic case while limiting the "more niche" / advanced uses (though I wouldn't call restarting a second I feel like preferring the latter. |
re: stars and issues yeah the original repo should be kept for at least the I tend to think it would still make sense to split out I'm not quite sure what to do with the ndk-examples. There is a pretty decent collection of examples associated with android-activity here: https://github.com/rib/android-activity/tree/main/examples and maybe those could be split out into a replacement
I would tend to think so but I think that's really up to @MarijnS95 at the moment.
Personally I'm not one for wanting to pick sides / winners when it comes to mobile / android build tools for Rust projects. There are so many use cases and trade offs and levels of maturity etc. I have my own personal preference atm for using In my view, if there is an organisation for collecting android/mobile rust crates it'd be fine to have overlapping scope between projects (e.g. build tools) and the benefit of the organisation can be more about facilitating discovery and cross-pollination than anything else.
I think we should keep it for now - it solves a real problem, even though it's not perfect. The issue with having a global activity is a valid concern for supporting multiple activities in a single process (which Android allows) but we should treat that as a separate issue. |
Just to add a bit more about |
So decisions:
Is this a fair summary of the conversation? |
No denying that |
with the filter branches I ended up redoing them so they would keep things like the license files + .github .gitignore + rustfmt I still re-ran the filter branch for (essentially the main two filtered repos left are In terms of archiving |
For the examples; the easiest thing with these would be for me to split out the example from android-activity instead of keeping the originals just because the current examples assume using Is there a strong interest in having the looper and jni examples specifically (they can probably be ported if so - just not sure if the looper one might be awkward) |
To test I have split out the examples from android-activity here: https://github.com/Android-Rust/rust-android-examples |
@dvc94ch with the way Like with the |
I was going to rename the organisation linked above to "Rust Mobile" to have a more inclusive scope if no objections to that? |
Not really a problem. The instructions for cargo-apk work almost identically with xbuild if they don't require anything special in the manifest. The largest difference is specifying the android manifest in manifest.yaml instead of trying to use some contortion to express it in the Cargo.toml |
That sounds good; so then it'd be possible to show how people can opt in to using xbuild if they want without precluding other options too. I still haven't had a chance to look at xbuild properly but I think I'd be more inclined to give it a try if I knew it was compatible with a project using Gradle - so worst case it'd be easy to switch back to Gradle if necessary. |
I think I'll re-filter the cargo-apk repo to keep the examples (at least the hello world example) since that's effectively needed for the cargo-apk CI and it'd be awkward pulling in an external example for the CI |
Ok the updated organisation url is now: https://github.com/orgs/rust-mobile (though the old one redirects) |
btw for reference I took an initial look at getting that PR also includes a port of the examples to android-activity. If we do commit to this direction we'll have to decide on the precise ordering of things. E.g. there are a few pending PRs atm for cargo apk and so there would need to be a decision about whether to merge those first and then re-filter out cargo-apk or else those PRs would need to effectively get merged with the standalone repo. Also for reference here; the latest filter-repo for
|
done |
Yup, ramping down |
so currently a lot of the core components are spread out among various maintainers. it's hit @MarijnS95 the hardest since he is still maintaining legacy code which unless a company explicitly requires and pays for this doesn't make any sense what so ever. my suggestion would be this:
rust-windowing/android-ndk-rs
,rib/android-activity
,cloudpeers/xbuild
into new orgrm -rf ndk-glue ndk-macro ndk-build cargo-apk
to move in this direction I think that @rib @MarijnS95 @msiglreith would need to agree that this is the way forward. I'm maintaining
xbuild
as part of my day job, but it's unlikely I'll be able to contribute much toandroid-ndk-rs
andandroid-activity
.The text was updated successfully, but these errors were encountered: