-
Notifications
You must be signed in to change notification settings - Fork 111
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
RFC: deprecation of cargo-apk/ndk-build in favor of xbuild #260
Comments
Overall I'm quite happy with this:
And that's where I'm at now. Will need to fix that
We'll need to port that indeed to make Android library inclusion work.
As mentioned above, needing
I don't think we discussed
Sounds like serde coming in clutch, we can just move our original manifest structure from
I don't use any of this, don't remember if
Yeah as mentioned above it'd be great if:
Let's deprecate
Is it Importing |
Opened an issue rust-mobile/xbuild#47
sounds good
maybe, although most linux distros,
Was a last minute name change because xcli was already taken on crates.io |
For Windows we'll use clang/llvm from the Android NDK I suppose? Will be much easier to bundle
Shall we update the folder name too? Was a bit confusing to find |
Not sure if x should become a package manager. When it comes to setting up rust/clang/llvm, I think since rustup distributes most of it already, adding
Contacted the owner of the squated |
X does not need to become a package manager, it is already repackaging/bundling pieces from SDK/NDK and Here's hoping we can take over the |
well it's the package manager preinstalled on github action runners (actually that's how I first learned about it. it's just a presumption that it's popular based on it's use by github), which means it's on every windows machine I use 🤷♂️ |
@MarijnS95 haven't played around with it yet, but there seem to be a few rust adb implementations. Maybe it's not that much work to get rid of the adb dependency [0][1][2]. I'd prefer to look into this approach first. |
Justed tested the For now my only suggestion would be to re-use as much as possible of the prebuilt tools included in the ndk/sdk on Android, but that's already point of prev. discussion. Having to install llvm/adb (+ other tools?)/choco along with manually putting them into the path env variables on Windows can be annoying and error prone in case of version conflicts. |
@MarijnS95 at some point we should pull the trigger on this. what are your current feelings towards |
That's fine with me, but you can't complain if you don't get help maintaining it. |
@dvc94ch I won't complain about needing help, but receiving a review is always appreciated. I do need help reviewing the non-deprecated Also keep in mind |
Moving this into separate issue to increase discoverability.
that would be the first step, really looking forward to get your feedback on this.
There are a couple of differences between
cargo-apk
andx --platform android
:2.1
cargo-apk
uses readelf to automatically add third party libraries to apk. We could generalize it using llvm-objdump to make it work cross platform.2.2 C++ has not been tested, think it's just a matter of including the libc++
2.3 cmake has not been tested, but think we agreed previously that cmake should fix any issues instead of us working around it
2.4 manifest is parsed from the
manifest.yml
android: manifest:
section. this is to enable the same workflow in flutter, rust and flutter/rust apps. should be mostly compatible (superset of existing manifest features converted from toml to yaml)2.5 ndk-debug is not supported. I have a work in progress
x lldb
command which should be cross platform. this is on my todo list.2.6 not all resource stuff is supported in the rust aapt port. mostly just allows setting a icon mipmap and launch screen, as flutter does it's own cross platform resource management. this is probably the biggest downside, but hardcore android devs likely use
gradle
instead of a prebaked tool likex
orcargo-apk
.2.7 x currently repackages the android ndk (basically just takes the sysroot and leaves the rest). this means we currently only support the latest ndk. in the future we can see about supporting multiple ndk/sdk versions accross windows/macos/ios/android, at the moment you just get what we give you.
That would be cool, but let's start with 1 first :)
By removing the reliance on shell/python scripts spread out through the ndk and doing everything in rust, ndk-build is not really that useful anymore. Instead there is a bit of code to handle each platform in various places without requiring much special handling for android. You can simply call
cargo.use_ndk(path: &Path)
orcargo.use_xwin(path: &Path)
orcargo.use_ios_sdk(path: &Path)
.Not sure about this one. Can probably move some of the code in
xcli/src/cargo/mod.rs
tocargo-subcommand
. Another possibility would be to foldcargo-subcommand
andxcli/src/cargo/mod.rs
into a cargo utility crate inside thex
monorepo, as I expectx
to be the main "consumer".Originally posted by @dvc94ch in #238 (comment)
cc cargo-apk contributors/maintainers: @msiglreith @francesca64 @katyo @JasperDeSutter
https://github.com/cloudpeers/x
The text was updated successfully, but these errors were encountered: