3 ms·
> Finally, Cargo now supports Haiku and Android! Does this mean you can now build Android targets without a standalone NDK? That part wasn't quite clear from t
by vvanders 9y ago
> Finally, Cargo now supports Haiku and Android!
Does this mean you can now build Android targets without a standalone NDK? That part wasn't quite clear from the PR.
- steveklabnik 9y agoCargo now runs on an Android host. I'm not an Android dev so I don't know what that means regarding the NDK. https://github.com/rust-lang/cargo/pull/3885/files#diff-27a1525c20fcb2ec7c4c41e750113a93R18 https://github.com/rust-lang/cargo/pull/3885/files#diff-27a1... would imply to me that oyu still need an NDK.
- vvanders 9y agoAh, gotcha. Yeah, the Standalone NDK is a bit of a pain since the .cargo/config requires absolute paths to the linker/ar. It makes it hard to commit a common config file for multiple people working in one repo.
- anonova 9y agoI use the executable name in the config and tell people to add $STANDALONE_NDK/bin to $PATH. [target.arm-linux-androideabi] ar = "arm-linux-androideabi-ar" linker = "arm-linux-androideabi-gcc"
- vvanders 9y agoYeah, it'd be cleaner if you could include env vars in the config since I'm not a huge fan of polluting my PATH and usually NDK_HOME or similar is already defined.
- floatboth 9y agoI use a build script that takes environment variables https://github.com/myfreeweb/freepass/blob/706e8d9f25f08ac349918e4d83dc0a1e82dfa098/capi/build-android.sh https://github.com/myfreeweb/freepass/blob/706e8d9f25f08ac34... (and calls Cargo once per architecture. Android has many :D)