-
Notifications
You must be signed in to change notification settings - Fork 120
Description
Following up from #365 here is a specific plan for us to modularize this repo
Why?
Several of the crates are very orthogonal from each other:
ndk-gluein particular is unlikely to see continued development / maintenance so it would make sense to clearly sign post from here toandroid-activityand provide an archive for posteritycargo apkmay eventually be superseded by something likexbuildand it's also not inherently coupled to the the otherndkcomponents- Eventually we may aim to make
ndk-contextredundant if we can instead encourage crates that support Android to have explicit initialization APIs that may be given a jvm + Context/Activity (and therefore enabling multiple Activities in a single process) - None of these crates are inherently
rust-windowingspecific and there is probably more opportunity to foster collaboration around an organisation that's more broadly related to mobile OSs in general.
Where to?
Since it's anticipated that most people interested in Rust + Android are likely also interested cross-platform mobile support, we have created a general rust-mobile organization, initially owned by the contributors to android-ndk-rs and android-activity.
The idea is that I will also move android-activity here, along with splitting the android-activity/examples out into a new repo.
I believe @dvc94ch was also open to moving xbuild here too
Other Rust utilities and build tools etc catering to supporting Rust development for mobile operating systems would also be welcome to create repos here
How?
These are key repos that would be split out of android-ndk-rs:
ndk-glue- A filter of thendk-glueandndk-macrosubdirectories, updated with a notice to recommendandroid-activityfor new projects and then archived for posterity.cargo-apk- would be a filter of thecargo-apk+ndk-buildsubdirectories andndk-examples(renamed to `examples) and outstanding PRs + issues would be transferred to the new repondk-context- A filter of thendk-contextsubdirectoryndk- After removing all the subdirectories that have been filtered into standalone repos this repo would then be transferred torust-mobile(so all issues / PRs are preserved)
How to filter the repos:
git clone https://github.com/newren/git-filter-repo
ndk-glue
git clone https://github.com/rust-windowing/android-ndk-rs.git ndk-glue
cd ndk-glue
py ../git-filter-repo/git-filter-repo --path ndk-glue --path ndk-macro --path ndk-examples --path-rename ndk-examples:examples --path LICENSE-APACHE --path LICENSE-MIT --path Cargo.toml --path rustfmt.toml --path .github --path .gitignore
cargo apk
git clone https://github.com/rust-windowing/android-ndk-rs.git cargo-apk
cd cargo-apk
py ../git-filter-repo/git-filter-repo --path cargo-apk --path ndk-build --path ndk-examples --path-rename ndk-examples:examples --path LICENSE-APACHE --path LICENSE-MIT --path Cargo.toml --path rustfmt.toml --path .github --path .gitignore
ndk-context
git clone https://github.com/rust-windowing/android-ndk-rs.git ndk-context
cd ndk-context
py ../git-filter-repo/git-filter-repo --path ndk-context --path ndk-examples --path-rename ndk-examples:examples --path LICENSE-APACHE --path LICENSE-MIT --path Cargo.toml --path rustfmt.toml --path .github --path .gitignore
Coordination
What needs to get done?
ndk-glue
- Filter out the
ndk-gluerepo and push torust-mobile - Get CI working for the standalone
ndk-gluerepo - Update repository + homepage URLs in Cargo.toml for the standalone
ndk-gluerepo - Update the README for
ndk-glueto recommend that new projects useandroid-activity Open + merge a PR to remove thendk-glueandndk-macrosubdirectories from this repo
cargo-apk
- Filter out the
cargo-apkrepo and push torust-mobile - Get CI working for the standalone
cargo-apkrepo (including porting the examples to build againstandroid-activityinstead ofndk-glue) - Update repository + homepage URLs in Cargo.toml for the standalone
cargo-apkrepo Open + merge a PR to remove thecargo-apk,ndk-buildandndk-examplessubdirectories from this repo
ndk-context
- Filter out the
ndk-contextrepo and push torust-mobile - Get CI working for the standalone
ndk-contextrepo - Update repository + homepage URLs in Cargo.toml for the standalone
ndk-contextrepo Open + merge a PR to remove thendk-contextsubdirectory from this repo
removals from this repo
- Open + merge a PR to remove
ndk-glue,ndk-macros,cargo-apk,ndk-build,ndk-examplesandndk-contextfrom this repo
This PR will indicate:
- Where the code is moving too
- How the repos were filtered
- The last commit used as input for filtering
As follow up tasks we will:
- Mark the
ndk-gluerepo as "archived" on GitHub for posterity - Transfer outstanding
cargo-apkissues / PRs from this repo to the standalone repo - Transfer this repo to
rust-mobile - Update repository + homepage URLs in Cargo.toml for this repo
- Update the README for this repo to reflect the modularization changes
I'm happy to get the ball rolling with re-filtering the repos (since we already did one draft run of this a while ago) as well as getting CI bootstrapped for the standalone repos (I already have a draft for getting the cargo apk CI working and porting the ndk-examples to build against android-activity)
Does this plan sound practical?