Git Product home page Git Product logo

cargo-ndk-docker-image's Introduction

cargo-ndk Docker image

Release CI Docker Hub

Docker Hub | GitHub Container Registry | Quay.io

Changelog

Supported tags and respective Dockerfile links

Supported Rust targets

  • aarch64-linux-android
  • armv7-linux-androideabi
  • x86_64-linux-android
  • i686-linux-android

What is cargo-ndk?

This Cargo extension handles all the environment configuration needed for successfully building libraries for Android from a Rust codebase, with support for generating the correct jniLibs/ directory structure.

This image also contains Android NDK and Rust targets for building source code for Android.

https://crates.io/crates/cargo-ndk

https://developer.android.com/ndk

How to use this Docker image

Mount your project directory and run the cargo ndk command:

docker run --rm -v /my/rust/project:/app -w /app instrumentisto/cargo-ndk \
    cargo ndk -o ./jniLibs build

After doing that you will see jniLibs/ folder with libraries for all the supported Android targets.

Image tags

<X>

Latest tag of the latest major X cargo-ndk version.

<X.Y>

Latest tag of the latest minor X.Y cargo-ndk version.

<X.Y.Z>

Latest tag of the concrete X.Y cargo-ndk version.

ndk<rA>

Latest tag containing the concrete rA Android NDK version.

rust<B.C>

Latest tag containing the latest minor B.C Rust version.

<X.Y.Z>-ndk<rA>-rust<B.C>-r<N>

Concrete N image revision tag of the concrete X.Y.Z cargo-ndk version with the concrete rA Android NDK version and the latest minor B.C Rust version.

Once built, it's never updated.

License

cargo-ndk is licensed under Apache-2.0/MIT licenses.
Android NDK is licensed under its own license.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

The sources for producing instrumentisto/cargo-ndk Docker image are licensed under Blue Oak Model License 1.0.0.

Issues

We can't notice comments in the DockerHub (or other container registries) so don't use them for reporting issue or asking question.

If you have any problems with or questions about this image, please contact us through a GitHub issue.

cargo-ndk-docker-image's People

Contributors

alexlapa avatar dependabot[bot] avatar evdokimovs avatar tyranron avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

ykasidit

cargo-ndk-docker-image's Issues

Unable to find library -lgcc

Hi, I've been trying to use your docker image to build my project, and I get an error:

debug/deps/libsolana_program-5157481aeabacb81.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro,-znow" "-nodefaultlibs"
  = note: ld: error: unable to find library -lgcc
          clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: could not compile `solana-program` due to previous error
[2022-07-16T18:15:49Z INFO  cargo_ndk::cli] If the build failed due to a missing target, you can run this command:
[2022-07-16T18:15:49Z INFO  cargo_ndk::cli] 
[2022-07-16T18:15:49Z INFO  cargo_ndk::cli]     rustup target install x86_64-linux-android

I tried to install lgcc manually. Dockerfile:

FROM instrumentisto/cargo-ndk:2.8.0
RUN apt-get update && apt-get install -y gcc-multilib

And it didn't work.

I will create an example for you soon on Github with a build that fails

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.