Git Product home page Git Product logo

Comments (4)

bbqsrc avatar bbqsrc commented on June 2, 2024 1

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.

bbqsrc avatar bbqsrc commented on June 2, 2024

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.

fzyzcjy avatar fzyzcjy commented on June 2, 2024

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.

fzyzcjy avatar fzyzcjy commented on June 2, 2024

@bbqsrc I see. Thank you for the reply!

from cargo-ndk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.