Comments (4)
All things are possible but I aim to keep cargo-ndk
as close to "zero features" as possible. The tool only exists because the NDK is an aberration to the extent that doing anything for Android directly with cargo
is a nightmare of environment variables and weird errors that are hard to diagnose. Ultimately, I hope for this tool to be completely redundant eventually.
I do not want the tool to include features that other tools become dependent on. cargo-ndk
should only be used to the extent that it smoothes out the rough edges of building Rust crates for Android, with a particular amount of sympathy for those users trying to build crates with C dependencies. Anything that goes beyond what we would expect of a well-oiled NDK integration in cargo
itself is out of scope.
The auto-detection only exists because Android Studio decided to introduce the multi-version nonsense which made doing anything even half-resembling CI a massive pain every time the base image was updated. I was reluctant to add it then, and I somewhat regret having added it now even though it is a great convenience.
I strongly recommend providing explicit environment variable paths to the specific NDK to be targeted if using the most recent version is not the desired behaviour. Being explicit to this extent is, to my mind, the best practice.
Environments differ so significantly between systems that any desire to automate this will just lead to more bug reports in the future (for me and/or the dependent projects), made all the more obscure by the layering of tools, differing operating systems, and constant random breakage from Google screwing around with how the NDK is structured (which happens basically every release).
from cargo-ndk.
I appreciate the desire for such a feature, but it's not a maintainability burden I'm willing to entertain at this time. Sorry!
from cargo-ndk.
It's OK! So is it possible to expose a method, say, cargo ndk get-current-ndk-path
, which returns the ndk you automatically choose. Then I can use this data to create the path I want (the pinned ndk version). This will not introduce maintainbility IMHO, since it does nothing but simply exposing what is already implemented.
from cargo-ndk.
@bbqsrc I see. Thank you for the reply!
from cargo-ndk.
Related Issues (20)
- ld: error: undefined symbol: stdin HOT 1
- Add cdylib automically via `--crate-type` HOT 1
- 3.2.0 version seems to be different from 3.1.2, failed to correctly find the compiler HOT 1
- C linker issue HOT 6
- CFLAGS getting ignored HOT 17
- error[E0308]: mismatched types HOT 1
- Changes for 3.3 release haven't been pushed to main HOT 1
- Using proc-macros - no .kt file HOT 1
- install error
- x86_64 linker issue HOT 7
- Not an issue. Just a question if there is any version support NDK 21? HOT 1
- A library produces .sos with undefined symbols HOT 3
- Build failure on for rocksdb dependency on `Ubuntu 22.04` (amd64) machine while cross-compiling for `aarch64-linux-android` HOT 4
- Error in build HOT 1
- Feature request: Printing environment variables set HOT 31
- Install cargo-ndk failed HOT 4
- m1 Mac: ARCH not found in this scope HOT 2
- Feature Request: Set Env for clang/cc-rs HOT 3
- What's the difference when handle libc++_shared.so HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-ndk.